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 com.firebase.sandbox; | |
import java.awt.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import javax.imageio.ImageIO; | |
import org.json.JSONObject; | |
public class Png2Json { | |
public static void main(String[] args) { |
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
#!/usr/bin/env bash | |
# OpenSSL requires the port number. | |
SERVER=$1:443 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Obtaining cipher list from $(openssl version). | |
for cipher in ${ciphers[@]} |
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
PST PDT GMT | |
01:00 02:00 09:00 | |
02:00 03:00 10:00 | |
03:00 04:00 11:00 | |
04:00 05:00 12:00 | |
05:00 06:00 13:00 | |
06:00 07:00 14:00 | |
07:00 08:00 15:00 | |
08:00 09:00 16:00 | |
09:00 10:00 17:00 |
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
#!/usr/bin/env python | |
# | |
# based on http://stackoverflow.com/a/2753343o | |
# | |
# input needs to be presorted | |
# | |
import math | |
import functools | |
import fileinput |
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
// http://budweiser.cadstudio.cz/2015/08/shadow-cube-3d-model-of-c-d.html | |
$fn=100; | |
S=10; // size in mm | |
// "C" "A" "D" - modelled letters | |
intersection() { | |
M("A", S); // "A" |
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
object App extends Logging { | |
def main(args: Array[String]) = { | |
setupNetty | |
scalaReplConsole | |
} | |
/** | |
* Setup Netty for things like logging, etc. This should happen first. Do not get rid of this. | |
* You'll have a calamity on your hands if it needs to log under stress and it is unable to. |
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
def initialize(context): | |
# Reference to SPY | |
context.spy = sid(8554) | |
schedule_function(buySpread, date_rules.week_start(), time_rules.market_open()) | |
def buyFront(context, data): | |
weekno = get_datetime('US/Eastern').isocalendar()[1] | |
# Invest in first 4 pay cycles | |
if (weekno % 2 == 0) and (weekno <=8): | |
if data.can_trade(context.spy): |
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
# On bash + Linux | |
# Show TCP sockstats every 5 seconds | |
$ while [ : ]; do echo -n `date`; echo -n ": "; cat /proc/net/sockstat | sed 'N;s/\n/ /;' | grep TCP; sleep 5; done | |
# Show netstat connection state counts every 5 seconds | |
$ while [ : ]; do echo -n `date`; echo -n ": "; netstat -n | awk '/^tcp/ {t[$NF]++}END{for(state in t){print state, t[state]} }' | tr '\n' ' '; echo ; sleep 5; done | |
# Show top 25 established IPs and their counts | |
$ lsof -n|grep TCP|grep ESTABLISHED|awk '{print $9}' |grep -e "->"|awk -F '->' '{print $2}'|awk -F ':' '{print $1}'|sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n|uniq -c|sort -rn|head -25 |
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
” ﱞ” | |
” ﱞ “ | |
ˇ˛ ^¸ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>title</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href=".css"> | |
<script src=".js"></script> | |
</head> | |
<body> |