As configured in my dotfiles.
start new:
tmux
start new with session name:
/* Database Schema for simple Forums | |
* Author: Dee the great amateur RDBS wizard | |
* 07 Dec 2011 - Initial Version | |
*/ | |
/* NOTE: You may want to alter this according to this setup, | |
* especially if you are not running the script as root and | |
* just need the tables. | |
*/ |
#!/bin/sh | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
for png in `find $1 -iname "*.png"`; do | |
echo "crushing $png ..." | |
pngcrush -rem alla -reduce -brute "$png" temp.png |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
html { | |
filter: brightness(0.8) sepia(0.9); | |
-o-filter: brightness(0.8) sepia(0.9); | |
-ms-filter: brightness(0.8) sepia(0.9); | |
-moz-filter: brightness(0.8) sepia(0.9); | |
-webkit-filter: brightness(0.8) sepia(0.9); | |
-salesforce-filter: brightness(0.8) sepia(0.9); | |
-dropbox-filter: brightness(0.8) sepia(0.9); | |
-blink-filter: brightness(0.8) sepia(0.9); |
import java.io.*; | |
import java.sql.*; | |
import com.google.gson.*; | |
import com.google.gson.stream.*; | |
public class ResultSetAdapter extends TypeAdapter<ResultSet> { | |
public static class NotImplemented extends RuntimeException {} | |
private static final Gson gson = new Gson(); | |
public ResultSet read(JsonReader reader) | |
throws IOException { |
private static Vector rotateZ(Vector v, double rot) | |
{ | |
return new Vector(v.getX() * Math.cos(rot) - v.getY() * Math.sin(rot), | |
v.getX() * Math.sin(rot) + v.getY() * Math.cos(rot), | |
v.getZ()); | |
} | |
private static Vector rotateY(Vector v, double rot) | |
{ | |
return new Vector( v.getX() * Math.cos(rot) + v.getZ() * Math.sin(rot), |
license: mit |