View stock.sol
pragma solidity ^0.4.10; | |
contract Stock { | |
mapping (address => shares) stockHolders; | |
uint numShares; | |
function Stock() { | |
numShares = 100; | |
} | |
View chord.html
<html> | |
<script> | |
// CSV file for link visits | |
// if there are 3 links here , then the data for the matrix is 3x3 for the links. | |
var uris = "link,visits,color\n" + | |
"/discover,1000,#E41A1C\n" + | |
"/tv,800,#FFFF33\n" + | |
"/channels,150,#FF7F00\n"; | |
// Visitors from one page to another, eg this says 4 visitors went /discover -> /tv |
View screenshot.sh
#!/bin/bash | |
bucket=rbmhmisc | |
uploaded_name=jt-$(date +"%Y-%m-%d-%s")-sn.png | |
s3_path=s3://$bucket/$uploaded_name | |
file=$(ls -tr ~/Desktop/Screen* | tail -n 1) | |
aws s3 cp "$file" "$s3_path" --acl public-read |
View perf
# hello world | |
This is ApacheBench, Version 2.3 <$Revision: 1706008 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 100000 requests | |
Completed 200000 requests | |
Completed 300000 requests | |
Completed 400000 requests |
View HTTP.java
import java.net.URL; | |
import java.net.URLConnection; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.lang.StringBuffer; | |
public class HTTP { | |
public static void get() throws Exception { | |
String urlString = "http://localhost:1234/"; |
View handler.clj
(ns in-mem.handler | |
(:require [compojure.core :refer :all] | |
[compojure.route :as route] | |
[ring.middleware.defaults :refer [wrap-defaults site-defaults]])) | |
(def start (slurp "../../tests/start.json")) | |
(defroutes app-routes | |
(GET "/start" [] start) | |
(route/not-found "Not Found")) |
View couchbase-bench.go
package main | |
import ( | |
"github.com/couchbase/go-couchbase" | |
"flag" | |
"log" | |
"math/rand" | |
"fmt" | |
"time" | |
"strconv" |
View nginx.conf
#user nobody; | |
worker_processes 2; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
View load-users.sh
#!/bin/bash | |
psql < create.sql | |
shuffled=./shuffled-words.txt | |
cat /usr/share/dict/words | awk 'BEGIN{srand()}{printf "%06d %s\n", rand()*1000000, $0;}' | sort -n | cut -c8- | head -n 20000 > $shuffled | |
>inserts.sql | |
exec 5< $shuffled |
NewerOlder