Skip to content

Instantly share code, notes, and snippets.

View alexyoung's full-sized avatar
💤

Alex Young alexyoung

💤
View GitHub Profile
<!DOCTYPE HTML>
<html>
<head>
<title>DailyJS Boomerang Example</title>
</head>
<body>
<h1>Boomerang Test</h1>
<div id="results">
</div>
@alexyoung
alexyoung / .vimrc
Created May 16, 2012 11:12
mouse-vimrc
" vim:fdm=marker
" Editor basics {{{
" Behave like Vim instead of Vi
set nocompatible
" Show a status line
set laststatus=2
" Show the current cursor position
// JsChat client code using Rhino
// rlwrap java -jar js.jar
// load('jschat-client-rhino.js');
var JsChat = {};
JsChat.Connection = function(server_address, port) {
importPackage(java.io);
importPackage(java.net);
namespace :tags do
task :generate do
puts 'Generating tags...'
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')
@alexyoung
alexyoung / train.sh
Created November 27, 2013 14:06
Tmux Train
#!/bin/bash
SESSION=tlol
tmux set -g default-shell /bin/bash
tmux set -g default-command /bin/bash
tmux new-session -d -s $SESSION
tmux send-keys "/usr/local/bin/sl" C-m C-d
@alexyoung
alexyoung / tmux.conf
Created July 19, 2013 16:12
tmux cheap powerline
#!/usr/bin/env sh
ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}'
@alexyoung
alexyoung / gapi.js
Last active December 12, 2015 06:38
JSON fixture for the Backbone tutorial
gapi = {};
gapi.client = {
load: function(path, version, cb) {
cb();
},
oauth2: {
userinfo: {
get: function() {
return {
execute: function(cb) {
@alexyoung
alexyoung / unix.sh
Created February 25, 2012 18:24
Unix License Plate
#!/usr/bin/env bash
tput civis
tput setab 255
tput clear
./vpad.sh 7
tput setaf 35
figlet -w `tput cols` -c -f roman "UNIX"
./center.sh "LIVE FREE OR DIE"
read -s
tput sgr0
Ext.ux.SchemaGrid = Ext.extend(Ext.grid.GridPanel, {
initComponent: function() {
var me = this,
schema = me.initialConfig.schema,
fields = schema.fields,
id = Ext.id();
var store = new Ext.data.JsonStore({
root: 'list',
@alexyoung
alexyoung / example.txt
Created December 9, 2011 16:58
example.txt
my-project/
Makefile (run tests)
index.js (require app.js and start it listening on a port)
package.json (include dependencies and devDependencies, package.json isn't just for publishing to npm)
lib/
app.js (Set up your Express app, assuming it's Express of course. You could do var User = require('models').User)
controllers/
users.js
models/
index.js (do exports.User = require('./user'); for each model)