Skip to content

Instantly share code, notes, and snippets.

@codeslinger
codeslinger / black-scholes.c
Created July 12, 2010 02:50 — forked from ecounysis/LICENSE.txt
Black-Scholes Option Pricing Model in C
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
double Normal(double);
double N(double, double, double, double, double);
double delta(double, double, double, double, double);
double delta2(double, double, double);
double ND2(double, double, double);
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'ElmCast/elm-vim'
Plugin 'cespare/vim-toml'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'elixir-lang/vim-elixir'
[user]
name = Toby DiPasquale
email = xxx
[alias]
co = checkout
ci = commit
st = status
pu = push
pl = pull
b = branch
@codeslinger
codeslinger / tmux.conf
Created February 27, 2024 15:36
tmux configuration
# Tmux settings
unbind-key C-b
set-option -g prefix C-l
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set -g default-terminal "screen-256color"
@codeslinger
codeslinger / toby.zsh-theme
Created February 27, 2024 14:22
OMZ theme
# Color shortcuts
RED=$fg[red]
YELLOW=$fg[yellow]
GREEN=$fg[green]
WHITE=$fg[white]
BLUE=$fg[blue]
CYAN=$fg[cyan]
RED_BOLD=$fg_bold[red]
YELLOW_BOLD=$fg_bold[yellow]
GREEN_BOLD=$fg_bold[green]

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@codeslinger
codeslinger / CircularFIFO.h
Created January 3, 2016 15:38
SPMC ring buffer implementation in C++ from DKit
/**
* CircularFIFO.h - this file defines the template class for a single-producer,
* multi-consumer, circular FIFO queue with a size initially
* specified in the definition of the instance. This queue
* is completely thread-safe so long as there is ONE and ONLY
* ONE thread placing elements into this container, and there
* can be as many as necessary remobing them from the queue.
* The syntax is very simple - push() will push an element,
* returning 'true' if there is room, and the value has been
* placed in the queue.
@codeslinger
codeslinger / 2fa
Created April 5, 2020 12:58 — forked from MineRobber9000/2fa
2-factor authentication terminal app in Python
#!/usr/bin/env python
import os, os.path, stat, sys, base64
# TOTP lib inlined
import time, hmac, base64, hashlib, struct
def pack_counter(t):
return struct.pack(">Q", t)
@codeslinger
codeslinger / paramiko-proxy.py
Created December 30, 2019 16:20 — forked from ovidiucs/paramiko-proxy.py
Paramiko Connect via proxy
#!/usr/bin/env python
#-*- coding:utf8 -*-
# sources
# 1. https://gist.github.com/tell-k/4943359#file-paramiko_proxycommand_sample-py-L11
# 2. https://github.com/paramiko/paramiko/pull/97
# info: http://bitprophet.org/blog/2012/11/05/gateway-solutions/
# local -> proxy-server -> dest-server
# ~/.ssh/config
#
# Host proxy-server
@codeslinger
codeslinger / reinvent-2017-youtube.md
Created December 5, 2017 19:07 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description