Skip to content

Instantly share code, notes, and snippets.

View TimDumol's full-sized avatar

Tim Joseph Dumol TimDumol

View GitHub Profile
- name: restart openvpn
systemd:
name: docker-openvpn
daemon_reload: yes
state: restarted
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <cstdio>
#include <cassert>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <complex>
#include <numeric>
#include <iostream>
#include <algorithm>
#include <set>
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFr2Lh4GOwfKLrQGQN5RhYRA0SL8jr8LtGXaWHsTmpWl timdumol@tim-laptop
class Option<T> {
private T val;
private bool hasVal;
public Option<T>() {
hasVal = false;
}
public Option<T>(T val) {
this.val = val;
hasVal = true;
set -k
source ~/.bashrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
@TimDumol
TimDumol / keybase.md
Created May 24, 2014 07:39
keybase.md

Keybase proof

I hereby claim:

  • I am TimDumol on github.
  • I am timdumol (https://keybase.io/timdumol) on keybase.
  • I have a public key whose fingerprint is C369 D1B4 BA9D 38C9 0E70 4DA3 9E8E 738D 39CC 1329

To claim this, I am signing this object:

@TimDumol
TimDumol / gist:b52fb9bbb50a33580742
Created May 22, 2014 13:10
Shortest Successive Paths for solving Min-cost Max-flow
const int N = 1024;
bool vis[N];
double pot[N];
struct Edge {
int a, b;
double cost;
int backward, forward;
Edge(int a, int b, double cost, int cap) :a(a), b(b), cost(cost),
backward(cap), forward(0) {}
int other(int x) { return x == a ? b : a; }
#!/bin/bash
NUM_TRIES=10
NUM_REQ_BATCHES=4
NUM_REQS_PER_BATCH=2
for i in $(seq $NUM_TRIES)
do
pserve development.ini &
pid=$!
sleep 3
for j in $(seq $NUM_REQ_BATCHES)
@TimDumol
TimDumol / gist:8101200
Created December 23, 2013 17:29
Euler 185
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <complex>
#include <cassert>
#include <numeric>
#include <iostream>
#include <algorithm>
#include <set>