Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted
@stevenwaskey
stevenwaskey / gist:02bb469a14dd809450f5d20ed3eb44db
Created April 1, 2016 20:10
maxed out slider transitions.
http://onehungrymind.com/demos/slideshow/
@stevenwaskey
stevenwaskey / gist:b8926a28aa65f30f512bcf32103cae06
Created April 8, 2016 01:10
Install composer globally from command line
sudo apt-get install curl php5-cli git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@stevenwaskey
stevenwaskey / gist:b8a8bffcb8491a04a283d3583780d425
Created April 8, 2016 13:39
ASCII Directory Tree command line
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
<?php
/*-----------------------------------------------------------------------------------*/
/* Directory
/*-----------------------------------------------------------------------------------*/
if ( get_stylesheet_directory() == get_template_directory() ) {
define('OF_FILEPATH', get_template_directory());
define('OF_DIRECTORY', get_template_directory_uri());
} else {
@stevenwaskey
stevenwaskey / gist:3d7f0136051b437286608d6b8e2c87f2
Created June 9, 2016 16:19
Install the AWS CLI Without Sudo (Linux, OS X, or Unix)
Install the AWS CLI Without Sudo (Linux, OS X, or Unix)
Amazon: [Installing the AWS Command Line Tool](http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os)
If you don't have sudo permissions or want to install the AWS CLI only for the current user, you can use a modified version of the above commands:
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
@stevenwaskey
stevenwaskey / ubuntu-php7-install.bash
Created June 15, 2016 01:27
Ubuntu 14.04 PHP7 (Install from Source)
#!/usr/bin/env bash
sudo -i;
apt-get update;
apt-get install --yes \
git \
bison \
autoconf \
*
***___________________________________________________________________
||| |
||| * * * * * |------------------------------------------
||| * * * * * * |000000000000000000000000000000000000000000
||| * * * * * |------------------------------------------
||| * * * * * * |
||| * * * * * |------------------------------------------
||| * * * * * * |000000000000000000000000000000000000000000
@stevenwaskey
stevenwaskey / wp.sh
Created July 20, 2016 02:38 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@stevenwaskey
stevenwaskey / wp.sh
Created July 20, 2016 02:47 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser