As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
| from flask import Flask, request, redirect, url_for | |
| from rauth.service import OAuth1Service | |
| twitter = OAuth1Service( | |
| name='twitter', | |
| consumer_key='TWITTER KEY', | |
| consumer_secret='TWITTER SECRET', | |
| request_token_url = 'https://api.twitter.com/oauth/request_token', | |
| access_token_url = 'https://api.twitter.com/oauth/access_token', | |
| authorize_url = 'https://api.twitter.com/oauth/authorize', |
| -module(doctor). | |
| -behaviour(supervisor). | |
| -export([start/0]). | |
| -export([init/1]). | |
| start() -> | |
| supervisor:start_link({local, doctor}, doctor, []). | |
| init(_Args) -> |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| RailsAdmin.config do |config| | |
| config.included_models = RailsAdmin::Config.models_pool << 'Delayed::Job' | |
| config.model Delayed::Job do | |
| label 'Task' | |
| navigation_label 'Background Processing' | |
| end | |
| end |
| AWS::SimpleDB.new.domains.select{|d| d.name.include? "Dev"}.map{|d| d.delete! } |
| class API::V1::BaseController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| before_filter :cors_preflight_check | |
| after_filter :cors_set_access_control_headers | |
| def cors_set_access_control_headers | |
| headers['Access-Control-Allow-Origin'] = '*' | |
| headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
| class AddFieldsToDelayedJobs < ActiveRecord::Migration | |
| def change | |
| add_column :delayed_jobs, :signature, :string | |
| add_column :delayed_jobs, :args, :text | |
| end | |
| end |