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
from pprint import pprint | |
import os | |
import sys | |
import json | |
from datetime import datetime | |
from notion_client import Client | |
# Replace with your API key | |
NOTION_API_KEY = os.environ.get("NOTION_API_KEY") |
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
pragma solidity ^0.4.10; | |
contract Stock { | |
mapping (address => shares) stockHolders; | |
uint numShares; | |
function Stock() { | |
numShares = 100; | |
} | |
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
<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 |
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 | |
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 |
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
# 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 |
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
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/"; |
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
(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")) |
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 ( | |
"github.com/couchbase/go-couchbase" | |
"flag" | |
"log" | |
"math/rand" | |
"fmt" | |
"time" | |
"strconv" |
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
#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; | |
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 | |
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