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:
qaq # clear register A | |
:g/pattern/y A # copy lines matching pattern to register A | |
:let @+ = @a # copy register A to clipboard |
""" | |
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 | |
$(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) { |
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" => { |
# 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 |
# From http://stackoverflow.com/a/13423584/153896 | |
module ActiveRecord | |
class QueryCounter | |
attr_reader :query_count | |
def initialize | |
@query_count = 0 | |
end | |
def to_proc |
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` |
# | |
# 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)" |
I hereby claim:
To claim this, I am signing this object:
(function( $ ){ | |
$.fn.dependsOn = function(element, value) { | |
var elements = this; | |
var hideOrShow = function() { | |
var $this = $(this); | |
var showEm; | |
if ( $this.is('input[type="checkbox"]') ) { | |
showEm = $this.is(':checked'); | |
} else if ($this.is('select')) { |