This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0463939bd9686f9e6799830de5c2c53e2551c016fe4d7e71e9064d9cb7a9660d8c786beadf46f0946c83aa692a2b060c7e0df7704f721229152b04b29192e07b4f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo swapoff -a; | |
| sudo rm -Rf /swapfile; | |
| sudo fallocate -l 1G /swapfile; | |
| sudo chmod 600 /swapfile; | |
| sudo mkswap /swapfile; | |
| sudo swapon /swapfile; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo fallocate -l 1G /swapfile; | |
| sudo chmod 600 /swapfile; | |
| sudo mkswap /swapfile; | |
| sudo swapon /swapfile; | |
| echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab; | |
| echo 'vm.swappiness = 10' | sudo tee -a /etc/sysctl.conf; | |
| sudo sysctl vm.swappiness=10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| After purchasing a humble book bundle, go to your download page for that bundle. | |
| Open a console window for the page and paste in the below javascript | |
| this fork downloads all formats and does so without using jquery (since that didnt work for me) | |
| note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this | |
| type “about:plugins” in the address bar and disable chrome's pdf viewer | |
| */ | |
| var pattern = /(MOBI|EPUB|PDF)$/i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0xe6f4e35268c595ba51ea1fdf7402b88d0eb2b069 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Make sure only root can run our script | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| echo "You're running $(cat /etc/issue)" | |
| add-apt-repository -y ppa:noobslab/icons # For faenza | |
| add-apt-repository -y ppa:peterlevi/ppa # For variety | |
| add-apt-repository ppa:kilian/f.lux # For f.lux (redshift) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DAEMON="/usr/bin/php" | |
| DAEMON_OPTS="/var/www/myproject/myscript.php" | |
| START_OPTS="--start --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} ${DAEMON_OPTS}" | |
| STOP_OPTS="--stop --pidfile ${PIDFILE}" | |
| test -x $DAEMON || exit 0 | |
| set -e | |