Skip to content

Instantly share code, notes, and snippets.

require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20130122.zip'
sha1 'a5f55b545500ebcb97e842f65ea9c90dd457f228'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
@halcyon
halcyon / halcyon.zsh-theme
Last active December 11, 2015 16:38
halcyon's zsh theme
function _prompt_char() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
echo "%{%F{blue}%}±%{%f%k%b%}"
else
echo ' '
fi
}
# This theme works with both the "dark" and "light" variants of the
# Solarized color schema. Set the SOLARIZED_THEME variable to one of
@halcyon
halcyon / jira.plugin.zsh
Last active December 11, 2015 16:38
jira zsh plugin
# To use: add a .jira-url file in the base of your project
# You can also set JIRA_URL in your .zshrc or put .jira-url in your home directory
# .jira-url in the current directory takes precedence
#
# If you use Rapid Board, set:
#JIRA_RAPID_BOARD="yes"
# in you .zshrc
#
# Setup: cd to/my/project
# echo "https://name.jira.com" >> .jira-url
require 'selenium-webdriver'
require 'pp'
profile = Selenium::WebDriver::Firefox::Profile.new
profile.add_extension 'JSErrorCollector.xpi' # https://github.com/mguillem/JSErrorCollector/raw/master/dist/JSErrorCollector.xpi
driver = Selenium::WebDriver.for :firefox, :profile => profile
# do stuff
@halcyon
halcyon / vmigrate.sh
Created September 25, 2013 17:21 — forked from jim80net/vmigrate.sh
#!/bin/bash
# Use this to send and receive files
# Dependencies:
# SSH-Keys setup for root users. I recommend using agent forwarding for this.
# mbuffer installed in /opt/local/bin/mbuffer. Adjust to reality.
#
# This script presumes:
# zsnapper is installed. Comment out the two lines where it is referenced if you don't use it
DATE=$(date +%Y%m%d%H%M)

fireplace

  • cpr => (require ... :reload)
  • cpR => (require ... :reload-all)

Evaluation

  • :Eval (clojure code) => runs (clojure code) in repl
  • cpp => evaluate inn-most expessions under cursor
  • cp<movement> => evaluate text described by <movement>
  • cqp => opens quasi-repl
  • cqc => quasi-repl command line window
require "rubygems"
require "zipruby" # gem install zipruby
require "rexml/document"
require "fileutils"
class Zip::Archive
def index
i = 0
each do |f|
if yield f
function _prompt_char() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
echo "%{%F{blue}%}±%{%f%k%b%}"
else
echo ' '
fi
}
# This theme works with both the "dark" and "light" variants of the
# Solarized color schema. Set the SOLARIZED_THEME variable to one of
--CREATE EXTENSION file_fdw;
--CREATE SERVER sfcsv FOREIGN DATA WRAPPER file_fdw;
CREATE FOREIGN TABLE sf_task (
Id text,
WhoId text,
WhatId text,
Subject text,
ActivityDate text,
Status text,
Priority text,
ALTER foreign table sf_task ADD column Customer_Meeting__c text;
select PG_TERMINATE_BACKEND(pid) from pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'salesforce';