Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Sophrinix's full-sized avatar

Andrew McElroy Sophrinix

View GitHub Profile
#!/usr/bin/env ruby
# This script performs an OAuth authorized POST with multipart encoding to
# http://twitter.com/account/update_profile_image.json
#
# This code is primarily taken from my Grackle library's implementation at
# http://github.com/hayesdavis/grackle
#
# RUNNING THIS WILL CHANGE AN ACCOUNT'S PROFILE IMAGE. BE CAREFUL.
#
# Used to graph results from autobench
#
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv
#
# This will generate three svg & png graphs
require "rubygems"
require "scruffy"
require 'csv'
require 'yaml'
# --------------------------------------------
# General
# --------------------------------------------
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments.
set :application, "domain.com" # Application name
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ...
# --------------------------------------------
# Server
# --------------------------------------------
@Sophrinix
Sophrinix / fragment.js
Created July 9, 2011 06:06 — forked from figital/fragment.js
jslinux start()
// hi ben
function start() {
var Hf,
i,
start,
If,
Jf;
if (!Gf()) {
aa.writeln("");
aa.writeln("Your browser does not support the W3C Typed Arrays and this version of JS/Linux needs them.\n");
@Sophrinix
Sophrinix / passenger.rb
Created October 5, 2011 03:42 — forked from tmm1/passenger.rb
eventmachine monkey-patch for passenger
# Monkey-patch for Passenger to use the EventMachine reactor.
# This allows the use of EM timers, EM.system/popen, and other async libraries (amqp, em-http-request, etc) inside a Rails process.
# This requires EM.watch which was added to EM's git repo recently. Build an EM gem first:
# git clone git://github.com/eventmachine/eventmachine
# cd eventmachine
# gem build eventmachine.gemspec
# sudo gem install eventmachine-0.12.9.gem
# Please do not use this in production =)
var circle = Titanium.UI.createView({
height:200,
width:200,
borderRadius:50,
backgroundColor:'#336699',
top:10,
left:50
});
currentWindow.add(circle);
@Sophrinix
Sophrinix / convertImages.sh
Last active December 21, 2015 07:38 — forked from bob-sims/convertImages.sh
This will be updated for alloy. If I don't finish this by 23rd of August, first person to spot that I haven't updated this for alloy gets a free beer on me at the next titanium themed conference.
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
#! /bin/bash
# inspired by Greg McCormick's (@crushmedianet) post
# http://crushmedia.net/2012/04/23/automated-build-of-titanium-iconloading-files/
# updated 4 Aug 2012: creates clipped iPad backgrounds by cropping 768x1024, etc.
# create following base images + save in APPNAME/Resources/:
# appicon-android-512x512.png
reset="\033[0;0m"
dir_color="\033[0;32m"
git_color="\033[2;37m"
ti_color="\033[2;36m"
alloy_color="\033[0;36m"
prompt_color=$reset
find-up() {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do