Skip to content

Instantly share code, notes, and snippets.

View zeroasterisk's full-sized avatar

alan blount zeroasterisk

View GitHub Profile
@zeroasterisk
zeroasterisk / VelocityNotes2014.md
Last active August 29, 2015 14:03
Some wonderful notes, from an amazing developer I work with, on his recent attendance at Velocity Conf.
From: Matt (https://github.com/mreishus)
Date: Mon, Jun 30, 2014
Subject: Velocity Conference CA 2014 Trip Report

Summary Evaluation of Velocity 2014:

  • The mobile share of internet traffic is on pace to eclipse desktop traffic within 2014. As a whole, developers are doing a poor job of optimizing for mobile and users are frustrated. Mobile sites are actually trending slower year over year, even with faster devices accounted for.
  • Even desktop performance affects business metrics (like conversion rate, bounce rate, page views, etc..). This can usually be measured without taking the time to optimize performance; most sites are serving a mixture of fast and slow experiences to users. Just correlate the metric vs performance while controlling for some variables (like location).
  • From Puppet's State of DevOps Report in 2014 - IT performance was qualified in a statistically valid way and highly correlated with these three independent metrics: MTTR (mean time to recover), lead time for chang
@zeroasterisk
zeroasterisk / example-unit-test-locakable.php
Last active August 29, 2015 14:03
A great example unit test for a PHP process that needs to fork to try concurrency locking
<?php
/**
* When lockMutex() happens, we aquire a semaphore
* no other processes have access while this is locked
*
* This unit test forks into 2 processes and verifies locking
*/
// Test that locking actually makes me wait if someone else has the lock.
public function testForkLockMutex() {
@zeroasterisk
zeroasterisk / jQuery-selector-for-input-values.js
Created July 29, 2014 21:28
Custom jQuery selector for Input values
/**
* Custom jQuery selector
* :val("inputvalue")
*
* usage: $('input:val("foo")')
*/
jQuery.extend(jQuery.expr[':'], {
val: function (el, i, meta) {
return meta[3] == jQuery(el).val();
}
@zeroasterisk
zeroasterisk / rsc_files_containers_urls.py
Created October 14, 2014 15:47
Rackspace API Cloud Files - List all Container URLs and Metadata (pyrax)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ----------------------------------------
#
# Setup:
# $ sudo pip install --upgrade git+git://github.com/rackspace/pyrax.git
# $ vim ~/.rackspace_cloud_credentials
# [rackspace_cloud]
@zeroasterisk
zeroasterisk / keybase.md
Last active August 29, 2015 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am zeroasterisk on github.
  • I am zeroasterisk (https://keybase.io/zeroasterisk) on keybase.
  • I have a public key whose fingerprint is CC3A 090E 2012 05DF 18A8 0928 D5CC A0D0 068D B533

To claim this, I am signing this object:

@zeroasterisk
zeroasterisk / fragment-of-nginx.conf
Created April 2, 2015 02:45
nginx config for client asset optimizations
http {
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_min_length 0;
gzip_types text/plain text/css text/javascript text/xml application/xml application/xml+rss application/x-javascript image/x-icon;
@zeroasterisk
zeroasterisk / nightwatch
Created April 20, 2015 18:23
nightwatch test runner script
#!/usr/bin/env node
// -------------------
// nightwatchjs script running
// - automatically downloads the selenium jar if missing
// - automatically passes through all arguments to the runner.js
// -------------------
var fs = require('fs');
var path = 'Vendor/selenium-server-standalone-2.44.0.jar';
@zeroasterisk
zeroasterisk / benchmark-loops.php
Last active August 29, 2015 14:19
Simple Loop Benchmarker
<?php
/**
* Simple Benchmarker for PHP While Loops
*
* USES pcntl_fork() to split to different processes,
* so we assure RAM utilization doesn't "bleed"
*
* Usage:
* We are using php files for the large test, just to get a bunch of "random"