Skip to content

Instantly share code, notes, and snippets.

# remap prefix to Control + a
unbind C-b
set -g prefix C-a
# bind C-a send-prefix
bind-key a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
@jpoz
jpoz / discover.go
Created January 29, 2015 06:52
Script to view your Account Balance for your Discover Card
package main
import (
"fmt"
"net/http"
"net/http/cookiejar"
"net/url"
"os"
"time"
before(:each) do
user = Factory.create(:user, :email => "younotcookin@snakebarf.com")
login_as(user)
@redis = mock("Redis", :null_object => true)
Redis.stub!(:new).and_return(@redis)
end
it "should add the params to a list for the current user" do
@redis.should_receive(:new)
require 'rubygems'
require 'sinatra'
Sinatra::Application.default_options.merge!(
:run => false,
:env => ENV['RACK_ENV']
)
get '/home/jpoz/wwc/public' do
"This does work"
server {
listen 80;
server_name www.example.com alias example.com;
root /home/jpoz/wwc/public;
passenger_enabled on;
}
@class UIGlassButton;
- (void)viewDidLoad {
UIGlassButton *myButton = [[UIGlassButton alloc] initWithFrame:CGRectMake(2,2,316,50)];
[myButton addTarget:self action:@selector(doJunk:) forControlEvents:UIControlEventTouchDown];
[myButton setTitle:@"Neat button!" forState:UIControlStateNormal];
[myButton setTintColor:[UIColor colorWithWhite:0.20f alpha:1]];
[self.view addSubview:myButton];
}
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
class Awesome < Application
def update
run_later do
Awesome.import_massive_junk
end
redirect(url(:sweet))
end
end
describe Awesome do
it "should import_massive_junk" do
Awesome.should_recieve(:import_massive_junk)
dispatch_to(Awesome, :update)
end
end
describe Awesome do
it "should import_massive_junk" do
Awesome.should_receive(:import_massive_junk)
dispatch_to(Awesome, :update)
Merb::Dispatcher.work_queue.pop.call
end
end