REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
| window.onload = function() | |
| { | |
| var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO, '', { | |
| preload: preload, | |
| create: create, | |
| update: update | |
| }); | |
| var dragging = false; |
REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
| In Mac: | |
| sudo ifconfig en0 alias 10.254.254.254 255.255.255.0 | |
| In Linux: | |
| sudo ip addr add 10.254.254.254/24 brd + dev eth0 label eth0:1 |
| <?php | |
| /** | |
| * SMAZ - compression for very small strings | |
| * | |
| * <pre>Smaz is a simple compression library suiBook for compressing very short | |
| * strings. General purpose compression libraries will build the state needed | |
| * for compressing data dynamically, in order to be able to compress every kind | |
| * of data. This is a very good idea, but not for a specific problem: compressing |
| ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
| # perhaps 2048 is better for web? | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| docker-machine create \ | |
| --driver=digitalocean \ | |
| --digitalocean-access-token=$DO_TOKEN \ | |
| --digitalocean-size=512mb \ | |
| --digitalocean-region=nyc3 \ | |
| --digitalocean-private-networking=true \ | |
| --digitalocean-image=ubuntu-15-04-x64 \ | |
| docker-swarm-kv-store | |
| docker $(docker-machine config docker-swarm-kv-store) run -d \ |
| #!/bin/sh | |
| # This program has two feature. | |
| # | |
| # 1. Create a disk image on RAM. | |
| # 2. Mount that disk image. | |
| # | |
| # Usage: | |
| # $0 <dir> <size> | |
| # |
| ******************************************************************** | |
| * HHVM is installed. | |
| * | |
| * Running PHP web scripts with HHVM is done by having your webserver talk to HHVM | |
| * over FastCGI. Install nginx or Apache, and then: | |
| * $ sudo /usr/share/hhvm/install_fastcgi.sh | |
| * $ sudo /etc/init.d/hhvm restart | |
| * (if using nginx) $ sudo /etc/init.d/nginx restart | |
| * (if using apache) $ sudo /etc/init.d/apache restart | |
| * |
| $ sudo apt-get update | |
| $ sudo apt-get install docker.io | |
| $ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker | |
| $ sudo sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io | |
| $ source /etc/bash_completion.d/docker.io |