This file contains 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"math" | |
"strconv" | |
) | |
func main() { |
This file contains 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
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 |
This file contains 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 | |
# | |
# 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 |
This file contains 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 | |
TARGET_DIR=${1:-"./new-repo"} | |
BRANCH=${2:-"master"} | |
REPO=${3:-"git://repo/name.git"} | |
if [ -e "${TARGET_DIR}" ] | |
then | |
pushd $TARGET_DIR | |
git fetch | |
exists=$(git show-branch $BRANCH > /dev/null 2>&1; echo $?) |
This file contains 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 | |
set -e | |
usage() { | |
cat << EOF | |
usage: $0 [options] | |
This script splits an existing folder inside of a git repo into its own | |
separate git repo, optionally preserving all existing tags and branches from the | |
parent repo. |
This file contains 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
var url = require('url'); | |
var http = require('http'); | |
var querystring = require('querystring'); | |
// Example usage: curl -I http://localhost:1337/?code=500 | |
http.createServer(function (req, res) { | |
var purl = url.parse(req.url).query; | |
var qs = querystring.parse(purl); | |
var status_code = qs.code || 200; |
This file contains 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
± for i in {1..10}; do ./wrk http://localhost:8000 -c 100 | grep Requests | awk '{print $2}';done | awk '{s+=$1} END {print s}' | |
5329.22 | |
This file contains 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
var email = require('emailjs'); | |
var cheerio = require('cheerio'); | |
var request = require('request'); | |
var url8GB = 'https://play.google.com/store/devices/details?id=nexus_4_8gb'; | |
var url16GB = 'https://play.google.com/store/devices/details?id=nexus_4_16gb'; | |
var defaultState = 'UNKNOWN'; | |
var trackingState8GB = defaultState; | |
var trackingState16GB = defaultState; |
This file contains 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 | |
# Author: [email protected] | |
# COMMANDS | |
# create: Args: <path to image file> <path to plain file> | |
# Encrypts a file using the GPG utility, then zips it up and embeds | |
# it into the image file |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
static int expiry = 30; | |
int main(int argc, char *argv[]){ | |
int k = *argv[1]; | |
int i=0; |
NewerOlder