Skip to content

Instantly share code, notes, and snippets.

View sxalexander's full-sized avatar
🚌
Remotely working for clients

Sam Alexander sxalexander

🚌
Remotely working for clients
View GitHub Profile
@sxalexander
sxalexander / memusage.rb
Created November 3, 2010 00:13
WebFaction Memory Usage Script
#!/usr/bin/env ruby
# Memory usage script for WebFaction customers adapted to attempt to
# draw username from the pwd
# Nick Trew <vxnick@gmail.com>
# 2009-05-25
# START CONFIG #
require 'pathname'
@sxalexander
sxalexander / .gitconfig
Created December 8, 2010 22:45
my gitconfig settings
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[color "branch"]
current = yellow reverse
@sxalexander
sxalexander / ssh-copy-id
Created September 1, 2011 23:39
Copy your local ssh key to a remote machine
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
<?php
/**
* Gets the current global post type if one is set
*/
function x_get_current_post_type() {
global $post, $typenow, $current_screen;
if( $post && $post->post_type )
$post_type = $post->post_type;
elseif( $typenow )
https://gist.github.com/ce2eda8ad7ae450ee73a
git checkout master; git clone git@switchyard.beanstalkapp.com:galois.git tmp; rm -rf .git; mv tmp/.git .git; rm -rf tmp; git reset --hard origin/master
http://jsfiddle.net/b55Cz/9/
http://rally-asu-superbowl.s3.amazonaws.com/ASU_Reaching_New_Heights_20k.webm
http://rally-asu-superbowl.s3.amazonaws.com/ASU_Partnering_for_Impact_20k.webm
http://rally-asu-superbowl.s3.amazonaws.com/ASU_MarsRover_20k.webm
http://rally-asu-superbowl.s3.amazonaws.com/ASU_Evolving_Education_20k.webm
http://rally-asu-superbowl.s3.amazonaws.com/output/Keyframed-ASU%20Did%20you%20Know-Partnering%20for%20Impact_hd.webm
http://rally-asu-superbowl.s3.amazonaws.com/output/Keyframed-ASU%20Did%20you%20Know-Reaching%20New%20Heights%20in%20service_hd.webm
http://rally-asu-superbowl.s3.amazonaws.com/output/Keyframed-ASU%20Did%20you%20Know-Evolving%20Through%20Education_hd.webm
http://rally-asu-superbowl.s3.amazonaws.com/output/Keyframed-ASU%20Did%20you%20Know-Mars%20Rover_hd.webm
@sxalexander
sxalexander / -
Last active August 29, 2015 14:16
$ magerun dev:setup:script:attribute catalog_product product_finish
<?php
$setup = new Mage_Catalog_Model_Resource_Setup('core_setup');
$attr = array (
'attribute_model' => NULL,
'backend' => NULL,
'type' => 'int',