Skip to content

Instantly share code, notes, and snippets.

echo "auto_prepend_file=/opt/www/proxy.php" >> /etc/php5/cli/php.ini
@akccakcctw
akccakcctw / pr.md
Created April 2, 2018 07:32 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@akccakcctw
akccakcctw / mysql-docker.sh
Created March 21, 2018 08:09 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE