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 / .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
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
SlexAxton /
Created Dec 11, 2013
Run this to update chromium to the latest nightly on os x
updatechromium () {
mkdir -p /Applications/Browsers
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;

Before I watched this, if someone would have asked about why Pointer Events wasn't getting into Chrome, I'd have pointed at Safari. I don't love that reason, but it makes sense with their current dominance on mobile. However, I don't necessarily agree, I think if every other browser implemented them, they'd come around. That's tended to be true on the web for the last 20 years (Old IEs, webgl, innerHTML, video codecs when hardware is present, etc)

As far as the main issues brought up here, which I hopefully have fairly summarized (in one sentence each, lol, sry) below, I don't see them as entirely compelling for dropping PE altogether, especially since so many real-world folks (jQuery, Dojo, IE-y people) like the unification quite a bit.

  1. Hit tests (with or without capture) are expensive and bad for performance

From what I can read from the previous calls and conversations[0] about this, it's less of an issue than it seems. From those conversations, it seemed like hit tests weren't cached, and Chrome at

SlexAxton / testswarmngingx.conf
Created Dec 2, 2010
a nginx conf for the testswarm .htaccess
View testswarmngingx.conf
location ~ \.ini$ { deny all; }
location / {
root /;
index index.php index.html index.htm;
try_files $uri $uri/index.php @normal; location @normal { redirects }
rewrite ^(.*[^/])$ $1/ permanent;
rewrite ^run/$ index.php?state=run last;
rewrite ^run/(.*)/?$ index.php?state=run&user=$1 last;
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 / 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 = ''
function scrape(countries, cb) {
var datapromises ={
SlexAxton /
Last active Dec 20, 2015
A messageformat require plugin
"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 /
Last active Dec 15, 2015
add this function to your .zshrc or .bashrc file to update chromium to the latest nightly with a command.
updatechromium () {
case "$unamestr" in
('Darwin') Platform="Mac"
platform="mac" ;;
('Linux') Platform="Linux"
platform="linux" ;;
(*) if [[ $# = 2 ]]
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()) {;
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 );
You can’t perform that action at this time.