Skip to content

Instantly share code, notes, and snippets.


Aaron Powell aaronpowell

Block or report user

Report or block aaronpowell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
justintv / .bashrc
Created Aug 17, 2009
Display git branch in bash prompt
View .bashrc
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
View Makefile
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
ipbastola /
Last active Oct 14, 2019
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64


Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
domenic /
Last active Oct 9, 2019
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
    // the rest of your code goes here.
slashdotdash /
Last active Sep 19, 2019
React + D3 (v2)

Multi-series bar chart rendered using React and D3.

View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
robdmoore / setup-cordova-phonegap.ps1
Last active Sep 2, 2019
Scripted/Automated installation script to set up Cordova/PhoneGap and Android on Windows
View setup-cordova-phonegap.ps1
# Run this in an elevated PowerShell prompt
<# This script worked on a fresh Windows Server 2012 VM in Azure and the following were the latest versions of each package at the time:
* Chocolatey
* java.jdk
* apache.ant 1.8.4
* android-sdk 22.6.2
* cordova 3.5.0-0.2.6
* nodejs.install 0.10.29
# Note: there is one bit that requires user input (accepting the Android SDK license terms)
sgoguen /
Last active May 24, 2019
A Small Elm-like DSL in F#

Making Toys with F# - A Small Elm-like DSL in F#

A Small Elm-Like DSL in F#

I've been working on a talk about the virtues of building toy examples for the purpose of communicating ideas with simple interactive examples.

The toys I talk about in my presentation are based my interest in tools that allow programmers to quickly build web applications that allow them to explore their architecture. So to kickstart this series off, I want to introduce a simple

View AzureAutoSettings.cs
using System;
using System.Collections;
using System.Configuration;
using System.Reflection;
using System.Web;
[assembly: PreApplicationStartMethod(typeof(EnvSettings.SettingsProcessor), "Start")]
namespace EnvSettings
tathamoddie / configuration.xml
Created Mar 22, 2017
Office Deployment Tool channel configuration
View configuration.xml
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit:
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from
The following sample allows you to download and install Office 365 ProPlus 2016 apps
You can’t perform that action at this time.