I hereby claim:
- I am dinjas on github.
- I am dinjas (https://keybase.io/dinjas) on keybase.
- I have a public key whose fingerprint is DB4C 13C4 E4BB 0C72 FC32 C65B E832 82FA 2A25 3CCF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
if [ -f "${rvm_path}/scripts/rvm" ]; then | |
source "${rvm_path}/scripts/rvm" | |
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
elif [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then | |
rvm use `cat .ruby-version`@`cat .ruby-gemset` | |
elif [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` |
# From http://stackoverflow.com/a/13423584/153896 | |
module ActiveRecord | |
class QueryCounter | |
attr_reader :query_count | |
def initialize | |
@query_count = 0 | |
end | |
def to_proc |
# Ways to execute a shell script in Ruby | |
# Example Script - Joseph Pecoraro | |
cmd = "echo 'hi'" # Sample string that can be used | |
# 1. Kernel#` - commonly called backticks - `cmd` | |
# This is like many other languages, including bash, PHP, and Perl | |
# Returns the result of the shell command | |
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
require 'rubygems' | |
require 'yaml' | |
# A demonstration of YAML anchors, references and handling of nested values | |
# For more info, see: | |
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
stooges = YAML::load( File.read('stooges.yml') ) | |
# => { | |
# "default" => { |
$(function() { | |
var $podcast_url, $preview_ele, createMediaElement, showError; | |
$preview_ele = $('[data-id="preview"]'); | |
$podcast_url = $('[data-id="podcast_url"]'); | |
/** | |
* Creates the mediaelement object | |
* @param {Boolean} silent Whether to auto play when mediaelement is created | |
*/ | |
createMediaElement = function(silent) { |
""" | |
Exports Issues from a specified repository to a CSV file | |
Uses basic authentication (Github username + password) to retrieve Issues | |
from a repository that username has access to. Supports Github API v3. | |
""" | |
import csv | |
import requests | |
qaq # clear register A | |
:g/pattern/y A # copy lines matching pattern to register A | |
:let @+ = @a # copy register A to clipboard |
Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist
.
If you use pow, echo 1080 > ~/.pow/mailcatcher
and go to http://mailcatcher.dev, otherwise use http://localhost:1080.
Currently pow doesn't seem to pass websockets through correctly. Looking into this.