sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
| Search for : (.*(\n|$)){2} | |
| alt+R - to toggle regular expression search | |
| alt+ENTER - to select all results |
sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
| function mime2ext($mime){ | |
| $all_mimes = '{"png":["image\/png","image\/x-png"],"bmp":["image\/bmp","image\/x-bmp","image\/x-bitmap","image\/x-xbitmap","image\/x-win-bitmap","image\/x-windows-bmp","image\/ms-bmp","image\/x-ms-bmp","application\/bmp","application\/x-bmp","application\/x-win-bitmap"],"gif":["image\/gif"],"jpeg":["image\/jpeg","image\/pjpeg"],"xspf":["application\/xspf+xml"],"vlc":["application\/videolan"],"wmv":["video\/x-ms-wmv","video\/x-ms-asf"],"au":["audio\/x-au"],"ac3":["audio\/ac3"],"flac":["audio\/x-flac"],"ogg":["audio\/ogg","video\/ogg","application\/ogg"],"kmz":["application\/vnd.google-earth.kmz"],"kml":["application\/vnd.google-earth.kml+xml"],"rtx":["text\/richtext"],"rtf":["text\/rtf"],"jar":["application\/java-archive","application\/x-java-application","application\/x-jar"],"zip":["application\/x-zip","application\/zip","application\/x-zip-compressed","application\/s-compressed","multipart\/x-zip"],"7zip":["application\/x-compressed"],"xml":["application\/xml","text\/xml"],"svg": |
| //WooCommerce Email Customizations | |
| add_filter( 'woocommerce_email_recipient_customer_note', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
| add_filter( 'woocommerce_email_recipient_customer_completed_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
| add_filter( 'woocommerce_email_recipient_customer_invoice', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
| add_filter( 'woocommerce_email_recipient_customer_processing_order', array( $this, 'fka_parent_email_recipient_filter_function' ), 10, 2); | |
| /** | |
| * $recipient could be comma separated to send to additional people | |
| * EX. $recipient .= ', $additonal_recipient'; | |
| */ |
| <?php | |
| /** | |
| * Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
| * to the end of the array. | |
| * | |
| * @param array $array | |
| * @param string $key | |
| * @param array $new | |
| * |
We will explain how to configure a cubieboard running debian as a reverese proxy.
The modules that will be used are wvdial and autossh
Credits goes to:
1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
| <!-- Get NumLock on keypad to work on osx for G80-3494, Realforce and so on --> | |
| <!-- By https://groups.google.com/d/msg/osx-karabiner/-2ns5XVXXdQ/kDGIKVSztjwJ --> | |
| <item> | |
| <name>Map NumLock to OSX NumLock function</name> | |
| <identifier>private.pc_numlock_to_mac_numlock</identifier> | |
| <autogen>__KeyToKey__ KeyCode::KEYPAD_CLEAR, KeyCode::VK_IOHIKEYBOARD_TOGGLE_NUMLOCK</autogen> | |
| </item> |
| #!/bin/bash | |
| # credits to: https://gist.github.com/2called-chaos/4285767 | |
| # Install: | |
| # curl -O https://gist.githubusercontent.com/ziogaschr/74884b8d5095c86a7cef/raw/d236c87d89a34b588f37838843279e8e02f073e9/setup-autossh-tunnel.sh | |
| # chmod u+x setup-autossh-tunnel.sh | |
| # ./setup-autossh-tunnel.sh | |
| # | |
| # Extra: | |
| # it is good to make a new user on both host and remote (http://linuxaria.com/howto/permanent-ssh-tunnels-with-autossh) | |
| # useradd -m -s /bin/false autossh |
| // Calculating the bounding box | |
| function boundbox ($lat, $lon, $distance, $units="km") { | |
| return array ( "N" => getDestinationCoordinates ($lat,$lon, 0,$distance,$units), | |
| "E" => getDestinationCoordinates ($lat,$lon, 90,$distance,$units), | |
| "S" => getDestinationCoordinates ($lat,$lon, 180,$distance,$units), | |
| "W" => getDestinationCoordinates ($lat,$lon, 270,$distance,$units)); | |
| } |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script><html> | |
| <!-- | |
| Created using jsbin.com | |
| Source can be edited via http://jsbin.com/pdfjs-helloworld-v2/8598/edit | |
| --> | |
| <body> | |
| <canvas id="the-canvas" style="border:1px solid black"></canvas> | |
| <input id='pdf' type='file'/> | |
| <!-- Use latest PDF.js build from Github --> |