Skip to content

Instantly share code, notes, and snippets.

Shane Cooke githubber

Block or report user

Report or block githubber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@githubber
githubber / backup.sh
Created Sep 16, 2016 — forked from n2j3/backup.sh
simplified backup script utilising Fabrizi's dropbox uploader. Based on Dave Hope's backup script ( http://davehope.co.uk/Blog/backup-your-linux-vps-to-dropbox/ )
View backup.sh
#!/bin/bash
BACKUP_SRC="/root /etc /home"
BACKUP_DST="/tmp"
MYSQL_SERVER="127.0.0.1"
MYSQL_USER="mysql username"
MYSQL_PASS="mysql password"
#VPS_ID="vpsidentifier"
# Stop editing here.
NOW=$(date +"%Y.%m.%d")
@dschneider
dschneider / convert_utf8_to_utf8mb4
Created May 7, 2014
How to easily convert utf8 tables to utf8mb4 in MySQL 5.5
View convert_utf8_to_utf8mb4
# For each database:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
# For each table:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# For each column:
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# (Don’t blindly copy-paste this! The exact statement depends on the column type, maximum length, and other properties. The above line is just an example for a `VARCHAR` column.)
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active Dec 5, 2019
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
View node-and-npm-in-30-seconds.sh
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
You can’t perform that action at this time.