Skip to content

Instantly share code, notes, and snippets.

Alex Sexton SlexAxton

Block or report user

Report or block SlexAxton

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
@SlexAxton
SlexAxton / pictureshow.txt
Created Dec 17, 2013
Lyrics to The Ericks and Melanies "Picture Show"
View pictureshow.txt
The Ericks and Melanies - Picture Show
Time is tall as trees we sit in
looking for some bones to fit in
empty words to sticky notions
poetry for familiar motions
pen-strokes waiting to catch our faces
sort them into fashion places
here we hang our knuckles white
cause from up here things seem alright
@SlexAxton
SlexAxton / bash_rc.sh
Created Dec 11, 2013
Run this to update chromium to the latest nightly on os x
View bash_rc.sh
updatechromium () {
mkdir -p /Applications/Browsers
Platform='unknown'
platform='unknown'
unamestr=`uname`
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;
@SlexAxton
SlexAxton / addressScaper.js
Created Nov 12, 2013
Scrape some country data
View addressScaper.js
// First run: `npm install request q`
var request = require('request');
var Q = require('q');
var COUNTRIES = ['US'];
var BASE_URL = 'http://i18napis.appspot.com/address/data/'
function scrape(countries, cb) {
var datapromises = countries.map(function(country){
@SlexAxton
SlexAxton / example.mf.json
Last active Dec 20, 2015
A messageformat require plugin
View example.mf.json
{
"error_message_required" : {
"message" : "Required",
"contentType" : null,
"description" : "This is a message displayed to a user that inputs are required.",
"variables" : [],
"photos" : []
},
"error_message_minlength" : {
"message" : "{number, plural, one { # character too short } other { # characters too short } }",
@SlexAxton
SlexAxton / updatechromium.sh
Last active Dec 15, 2015
add this function to your .zshrc or .bashrc file to update chromium to the latest nightly with a command.
View updatechromium.sh
updatechromium () {
Platform='unknown'
platform='unknown'
unamestr=`uname`
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;
(*) if [[ $# = 2 ]]
@SlexAxton
SlexAxton / .zshrc
Last active Oct 15, 2019
My gif workflow
View .zshrc
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@SlexAxton
SlexAxton / lol.html
Created Jan 4, 2013
The worst JavaScript I've ever mistaken for working code.
View lol.html
<script type="text/javascript">
(function() {
("#URL").change(function() {
if ((this).val()) {
window.open((this).val());
("#formElement").submit();
}
});
});
@SlexAxton
SlexAxton / safeForEach.js
Created Apr 23, 2012
Safe forEach in JavaScript
View safeForEach.js
Array.prototype.safeForEach = function ( fn ) {
var len = this.length;
for ( var cur = 0, cur < len; ++cur ) {
for ( var i = 0; i < len; ++i ) {
if ( this.hasOwnProperty[ i ] ) {
if ( i === cur ) {
fn && fn( this[ i ], i, this );
}
}
}
View prose.zsh-theme
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function hg_prompt_info {
hg prompt --angle-brackets "\
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
@SlexAxton
SlexAxton / Nonminified.js
Created Feb 8, 2012 — forked from anonymous/modernizr-2.5.2.min.js
Modernizr 2.5.2 that crashes IE7/8
View Nonminified.js
/* Modernizr 2.5.2 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-shiv
*/
;
window.Modernizr = (function( window, document, undefined ) {
var version = '2.5.2',
You can’t perform that action at this time.