Skip to content

Instantly share code, notes, and snippets.

Justin Thomas base698

  • VDMS
  • Santa Monica, CA
Block or report user

Report or block base698

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stock.sol
pragma solidity ^0.4.10;
contract Stock {
mapping (address => shares) stockHolders;
uint numShares;
function Stock() {
numShares = 100;
base698 / chord.html
Last active Feb 17, 2017
Sample chord diagram. Look at L235 to change the data.
View chord.html
// 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" +
// Visitors from one page to another, eg this says 4 visitors went /discover -> /tv
base698 /
Last active Feb 11, 2017
Easy copy and paste markdown.
uploaded_name=jt-$(date +"%Y-%m-%d-%s")-sn.png
file=$(ls -tr ~/Desktop/Screen* | tail -n 1)
aws s3 cp "$file" "$s3_path" --acl public-read
base698 /
Created Dec 20, 2016
Task List in Progress

Defining a Process [%]

Collective Standards

Pricing Spreadsheet [50%]

do yearly cost with DB/API included
make one single dropdown for time selection

How much can we spend? How Performant does each node need to be?

Sheet for determining resources of a service. How many CPU? How much RAM?

Circuit Breakers [0%]

View perf
# hello world
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd,
Licensed to The Apache Software Foundation,
Benchmarking localhost (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
base698 /
Last active Nov 9, 2016
Stack Trace
import java.lang.StringBuffer;
public class HTTP {
public static void get() throws Exception {
String urlString = "http://localhost:1234/";
base698 / handler.clj
Created Oct 26, 2016
You can create a template app with lein with: lein new compojure hello-world
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 (
base698 / nginx.conf
Created Aug 24, 2016
nginx Built with: ./configure --add-module=../memc-nginx-module/ --add-module=../ngx_devel_kit/ --add-module=../set-misc-nginx-module/ --add-module=../redis2-nginx-module/ --add-module=../srcache-nginx-module/ --add-module=../echo-nginx-module/ --add-module=../ngx_http_redis-0.3.8
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/;
base698 /
Created Aug 22, 2016
Create a bunch of random users for a PG Database
psql < create.sql
cat /usr/share/dict/words | awk 'BEGIN{srand()}{printf "%06d %s\n", rand()*1000000, $0;}' | sort -n | cut -c8- | head -n 20000 > $shuffled
exec 5< $shuffled
You can’t perform that action at this time.