User Tools

Site Tools


linux:stuff

Stuff

Pair Firefox29 with Owncloud mozilla_sync

  • Go to your Owncloud installation https://myowncloud/remote.php/mozilla_sync and accept the SSL Certificate
  • Open about:config
  • Create: services.sync.username <string> The value should be a hash not the username itself. (You only need the hash if the sync was setup with a pre FF29, if you start from scratch the string doesn't matter)
  • Restart Firefox
  • Go to: Preferences → Sync → Setup Firefox sync (you should see the old UI now)
    • 'I Have an Account'
    • 'I don't have the device with me'
    • 'Account' - again use the hash NOT the actual username!
    • 'Password' - …
    • 'Recovery Key' - Get the right key from an older browser, you can find it in the sync settings

To generate the hash:

import hashlib,import base64 print base64.b32encode(hashlib.sha1("user@server.tld").digest()).lower()

Source: https://gist.github.com/mariussturm/061b9f4861ef1292aa60

Add AwesomeWM to LightDM session list

Looks like it's a bug, but can easily be fixed. Edit /usr/share/xsessions/awesome.desktop and change NoDisplay= from true to false.

Show the whole HID descriptors on GNU/Linux

From: libusb-nabble # Unbind the HID driver cd /sys/bus/usb/drivers/hiddev ls # Find the filename for the interface you want to unbind. Form is: B-P:C.I # where B is the bus number, P is a string of port numbers separated by periods, C is the configuration value, and I is the interface number. echo -n interface-filename >unbind # When you're done, reattach it echo -n interface-filename >bind

Install NGinx + PHP + FuelPHP

 sudo aptitude update sudo aptitude install nginx php5-fpm php5-cli

Edit /etc/nginx/php-handler

location ~* ^/.//.php.//$ { fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_index index.php; fastcgi_pass unix:/var/run/php5-fpm.sock; include fastcgi_params; fastcgi_param   PATH_INFO         $fastcgi_path_info; fastcgi_param   SCRIPT_FILENAME   $document_root$fastcgi_script_name; }

====== Security stuff ======
location ~ /.ht { deny  all; }

Edit /etc/nginx/sites-available/01-YOUR_HOST

====== wildcard subdomains ======
server { listen 80;


        server_name  ~^(?<dom>[^\.]+)+\.YOUR_HOST$;
        if (!-d /srv/www/YOUR_HOST/$dom) {
                rewrite . http://www.YOUR_HOST/ redirect;
        }
        root /srv/www/YOUR_HOST/$dom;
  
        index index.php index.html index.htm;
        include php-handler;
  
}

Link it as enabled

sudo ln -s /etc/nginx/sites-available/01-YOUR_HOST /etc/nginx/sites-enabled/01-YOUR_HOST

Restart the services

sudo service php5-fpm restart sudo service nginx restart

wget -O fuelphp-1.7.2.zip http://fuelphp.com/files/download/28 unzip fuelphp-1.7.2.zip mv fuelphp-1.7.2 /srv/www/YOUR_HOST///YOUR_SITE//

Edit /srv/www/YOUR_HOST///YOUR_SITE///index.php

<?php header('Location: public/'); ?>

Chmod it correctly:

sudo chown www-data:www-data /srv/www/YOUR_HOST///YOUR_SITE// 
/home/share/www/redox.ws/wiki/data/pages/linux/stuff.txt · Last modified: 2023/11/24 22:19 by redox