Skip to content

Instantly share code, notes, and snippets.

@wangii
wangii / hack.sh
Created June 18, 2012 00:37 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@wangii
wangii / test
Last active December 13, 2015 19:08
test
{"key":"value","key2":"value"}

Git Cheat Sheet

Commands

Getting Started

git init

or

@wangii
wangii / latency.txt
Created November 12, 2017 19:03 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
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

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

layer {
name: "data"
type: "Input"
top: "data"
input_param {
shape {
dim: 1
dim: 1
dim: 96
dim: 96
input: "image"
input_dim: 1 # Original: 2
input_dim: 3 # It crashes if not left to 3
input_dim: 1 # Original: 368
input_dim: 1 # Original: 368
layer {
name: "conv1_1"
type: "Convolution"
bottom: "image"
top: "conv1_1"
@wangii
wangii / emmiter.cpp
Last active January 27, 2019 09:32
emmiter
//PLEASE NOTE: The ParticleEmitter class functions have changed since this tutorial
//after I reorganized some things for the SIMD update loop. The final code for that
//is linked in the optimization section.
enum ParticleFacingType
{
ParticleFacing_2D_Billboard,
ParticleFacing_3D_Billboard
};
@wangii
wangii / tmux-default-bind-key.tmux
Created September 23, 2019 21:12 — forked from zchee/tmux-default-bind-key.tmux
Tmux default bind-key
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-q confirm-before kill-server
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
# Commennt out caused by Gist syntax error
@wangii
wangii / GLSL-Noise.md
Created October 11, 2021 07:03 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}