Skip to content

Instantly share code, notes, and snippets.

View donaldallen's full-sized avatar

Donald Allen donaldallen

View GitHub Profile
<div class="chart" id="chart1"></div>
[ip4]{
"template": ip4.barChart(), // Can be changed to ip4.pieChart(), ip4.lineChart()
"parentElement": "#chart1",
"data": {
"reader": ip4.dataReader()
.data([
<!— INSERT ROWS HERE, REPLACING THIS LINE —>
@donaldallen
donaldallen / gist:8867659
Last active August 29, 2015 13:56
Add record to TrackVia
<?php
$record = array(
'First Name' => 'Donald',
'Last Name' => 'Allen',
'Email' => 'don@topdraw.com',
'Phone Number' => '(780) 429-9993',
'Organization New' => 'Top Draw',
'Title' => 'Senior Web Developer',
'City' => 'Edmonton',
gulp.task('watch', function() {
server.listen(35729, function (err) {
if (err) {
return console.log(err)
};
gulp.watch('assets/sass/*.scss', ['styles']);
gulp.watch('assets/js/*.js', ['scripts']);
gulp.watch('assets/source/img/*', ['images']);
@donaldallen
donaldallen / gist:9281705
Created February 28, 2014 22:51
My .zshrc config.
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="cloud"
alias zshconfig="subl ~/.zshrc"
alias ohmyzsh="subl ~/.oh-my-zsh"
alias mk=popd
alias ls="pwd; ls --color"
@donaldallen
donaldallen / gist:9378369
Created March 5, 2014 22:50
Sharing gulp projects with other devs can be pain, because you need to tell them to have node, brew, etc. installed. This script does that for them.
#!/bin/sh
if ! brew_loc="$(type -p "brew")" || [ -z "brew_loc" ]; then
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
else
printf "\e[0;32mBrew\e[0m already installed.\n"
fi
printf "Updating \e[0;32mBrew\e[0m...\n\n"
@donaldallen
donaldallen / gist:9509497
Created March 12, 2014 15:44
If you keep all your websites in one directory, this is a pretty handy way to run vagrant up. $ start WebsiteFolderName
#!/bin/sh
DIRECTORY="/Users/dallen/Sites/GitHub/$1"
if [ -d "$DIRECTORY" ]; then
cd "$DIRECTORY" && vagrant up
else
echo "Directory does not exist."
fi
### Keybase proof
I hereby claim:
* I am donaldallen on github.
* I am donaldallen (https://keybase.io/donaldallen) on keybase.
* I have a public key whose fingerprint is 4F9C 9B69 5B22 7243 180E 217E 0A45 F625 D46E FB18
To claim this, I am signing this object:
@donaldallen
donaldallen / gist:798859ce0eacadae2f74
Created May 1, 2014 22:32
Sass preserve comment block
/*!
Theme Name: Shaw Conference Centre
Theme URI: http://www.topdraw.com/
Description: Shaw Conference Centre theme.
Author: Top Draw
Author URI: http://www.topdraw.com
Version: 1.0
*/
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: null
memory: '512'
chosen_provider: virtualbox
network:
private_network: 192.168.56.110
---
vagrantfile-local:
vm:
box: puphpet/ubuntu1404-x64
box_url: puphpet/ubuntu1404-x64
hostname: vagrant.example.com
memory: '512'
chosen_provider: virtualbox
network:
private_network: 192.168.56.110