This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%ul.tabs | |
%li | |
%a.active{ href: '#'} Tab 1 | |
%li | |
%a{ href: '#'} Tab 2 | |
%li | |
%a{ href: '#'} Tab 3 | |
%li | |
%a{ href: '#'} Tab 4 | |
%li |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%7Bdocument.getElementById(%27phonenumber%27).className%3D%27%27%3B%7D)()%3B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def leaderboard(project) | |
leaderboard = [] | |
committers = `cd ~/#{project}; git checkout master; git shortlog -nse --no-merges --since={last.month}` | |
committers.split("\n").each do |committer| | |
c = committer.split("\t") | |
leaderboard.push name: c.last.split('<').first.strip, values: [c.first.to_i] | |
end | |
leaderboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'nokogiri' | |
def add_urls_to_buffer! | |
@xml.css('sitemap loc').each{ |node| @buffer << node.text } | |
end | |
def save_urls_to_file! | |
@xml.css('url loc').each do |url| | |
puts "Saving #{url.text}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Order all letters in a word in a string | |
# | |
# Examples: | |
# | |
# ocdify('What is the point of this') | |
# # => 'ahtw is eht inopt fo hist' | |
# | |
# Returns the ordered String | |
def ocdify(string) | |
a = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { padding: 4em; } | |
#droplet { | |
background-color: lightblue; | |
width: 150px; | |
height: 150px; | |
-webkit-border-top-left-radius: 0; | |
-webkit-border-top-right-radius: 75px; | |
-webkit-border-bottom-right-radius: 75px; | |
-webkit-border-bottom-left-radius: 75px; | |
-webkit-transform:rotate(45deg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
orig_hits = [] | |
spec_hits = [] | |
# In Mountion Lion Apple uses BSD grep with REG_ENHANCED enabled, | |
# so all regular regex special chars like ?, | and + need to be | |
# escaped... | |
def grep_focus | |
if `grep --v`.match /BSD/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'open-uri' | |
user = 'GITHUB_USERNAME' | |
pass = 'GITHUB_PASSWORD' | |
repo = 'user/repo' | |
pulls = JSON.parse(open("https://api.github.com/repos/#{repo}/pulls", :http_basic_authentication => [user, pass]).read) | |
pulls.each do |pull| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: carbon | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Runs carbon, a data aggregator | |
# Description: Runs the data aggregator needed for Graphite |