Skip to content

Instantly share code, notes, and snippets.

@jehiah
jehiah / fetchtest.go
Last active May 5, 2016 20:45 — forked from jsha/fetchtest.go
package main
import (
"bufio"
"errors"
"flag"
"fmt"
"net/http"
"os"
"sync"
@jehiah
jehiah / bitly.rb
Created February 25, 2011 04:46 — forked from richardtifelt/bitly.rb
# Bit.ly API implementation - thanks to Richard Johansso http://gist.github.com/112191
require 'httparty'
class Api::Bitly
include HTTParty
base_uri 'api.bit.ly'
format :json
# Usage: Bitly.shorten("http://example.com")
def self.shorten(url)
Bitly tech talk 4/22/2010
On 4/22 we held a bit.ly tech talk on 'Command Line Fu', where we invited talented hackers to come share their best moves. Please correct my notes and add your fu here!
# @jehiah
# in place file regex replacement
perl -pi -e 's/this/that/g' filename_pattern
# print the last column of a file ($NF stands for 'Number of Fields' or more commonly Last Field).