Skip to content

Instantly share code, notes, and snippets.

@planetoftheweb
planetoftheweb / bootstrap_prepros.js
Created June 20, 2014 21:05
Bootstrap loader for Prepros
// @prepros-prepend "jquery.js"
// @prepros-prepend "affix.js"
// @prepros-prepend "transition.js"
// @prepros-prepend "tooltip.js"
// @prepros-prepend "alert.js"
// @prepros-prepend "button.js"
// @prepros-prepend "carousel.js"
// @prepros-prepend "collapse.js"
// @prepros-prepend "dropdown.js"
// @prepros-prepend "modal.js"
@andsens
andsens / dump.sh
Last active October 24, 2023 07:04
Backup all MySQL databases into separate files
#!/bin/sh
## backup each mysql db into a different file, rather than one big file
## as with --all-databases. This will make restores easier.
## To backup a single database simply add the db name as a parameter (or multiple dbs)
## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is
## Create the user and directories
# mkdir -p /var/backups/mysql/databases
# useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup
## Remember to make the script executable, and unreadable by others
@cowboy
cowboy / github_post_recieve.php
Created October 11, 2010 02:04
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi