Skip to content

Instantly share code, notes, and snippets.

@jdpaton
jdpaton / curlit.sh
Created August 29, 2013 20:59
Shows the curl connection timings. Can't remember where I got this from.
#!/bin/bash
#
# curl wrapper returning timing information.
#
# curl format adapted from
# http://josephscott.org/archives/2011/10/timing-details-with-curl/
#
# Example usage:
# $ curlt http://www.apple.com
# $ time curlt http://www.apple.com -v
@jdpaton
jdpaton / add-folder-as-submodule.sh
Created August 30, 2013 04:49
Adds a bunch of subdirectories that are git modules to the parent git repo/folder
for i in $(ls -d bundle/*); do;if [ -d "$i"/.git ]; then; git submodule add $(cd $i && git remote show origin | grep Fetch | awk '{print $3}') ./$i; fi; done
@jdpaton
jdpaton / popstddev.go
Created May 12, 2015 06:26
[Go] Population Standard Deviation
package main
import (
"flag"
"fmt"
"math"
"strconv"
)
func main() {