Skip to content

Instantly share code, notes, and snippets.

View tsphethean's full-sized avatar

Tom Phethean tsphethean

View GitHub Profile
@tsphethean
tsphethean / keybase.md
Created April 17, 2019 20:05
keybase.md

Keybase proof

I hereby claim:

  • I am tsphethean on github.
  • I am tsphethean (https://keybase.io/tsphethean) on keybase.
  • I have a public key ASAEhPKaL0re498a862EdL0uf94-U8YqAFJgGqTnmJnNDwo

To claim this, I am signing this object:

@tsphethean
tsphethean / proxy_switch.sh
Last active August 29, 2015 13:57
Proxy switchy script
#!/bin/sh
if [[ -z "$1" ]]; then
echo "Usage: proxy_switch.sh en 1.1.1.1:8080.
proxy_switch.sh dis"
exit 2;
fi
if [[ "$1" == "en" ]]; then
export http_proxy=http://$2
@tsphethean
tsphethean / hhvm.hdf
Created December 26, 2013 21:20
HHVM Drupal configuration
Server {
Port = 8000
SourceRoot = /vagrant/public/drupal.vbox.local/www/
}
Eval {
Jit = true
}
Log {
Level = Error
@tsphethean
tsphethean / Setup VM
Last active January 1, 2016 11:29
Drupal and HHVM
git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/vagrant.git
cd vagrant
vagrant box add base http://files.vagrantup.com/precise64.box
vagrant up
sudo nano /etc/hosts
# add
# 33.33.33.10 drupal.vbox.local dev-site.vbox.local
vagrant ssh
# Update our packages
sudo apt-get update
@tsphethean
tsphethean / M101js Video IDs
Created August 22, 2013 18:59
Create a list of video IDs for downloading, based on wiki pages on the M101JS 10gen course. Install as a Chrome extension or Greasemonkey script in Firefox, load the Wiki page with the video links on, and paste the list of IDs into a text file. Then use youtube-dl (http://rg3.github.io/youtube-dl/) to download the files using: youtube-dl -f 18 -…
// ==UserScript==
// @name M101JS Downloader
// @namespace M101JS
// @include https://education.10gen.com/courses/10gen/M101JS/2013_August/wiki/M101JS/*
// @version 1
// @run-at document-end
// ==/UserScript==
(function() {
@tsphethean
tsphethean / Drupal 8 rebuild
Created June 25, 2013 11:01
Rebuild a drupal 8 site after fresh pull from git.
#!/bin/sh
# Drop old DB
mysql -uroot -e "DROP DATABASE drupal8"
# Create new DB
mysqladmin -uroot create drupal8
# Add permissions
mysql -uroot -e "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupal8.* TO 'drupal8'@'localhost' IDENTIFIED BY 'password'"
# Tidy up site files