Skip to content

Instantly share code, notes, and snippets.

@sauyon
sauyon / dijkstra.cpp
Last active December 20, 2015 14:39
Dijkstra's template for USACO
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
using namespace std;
#define NUMV 1 // the maximum number of vertices
#define PROB_NAME "dijkstra" //replace with problem name
#define INF ~(1 << 31)
@sauyon
sauyon / sauyon.zsh-theme
Created January 27, 2014 02:02
My ZSH prompt
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@sauyon
sauyon / bit.cpp
Last active August 29, 2015 14:02
BIT
#include <vector>
class BIT {
private:
vector<int> ft;
int size;
int lastone(int S) {
return S & (-S);
}
@sauyon
sauyon / kissblock.tamper.js
Created August 31, 2014 04:21
KissAnime adblock
// ==UserScript==
// @name Kissanime Adblocker
// @namespace http://sauyon.com/
// @version 0.1
// @description enter something useful
// @match http://kissanime.com/*
// @copyright 2013, Sauyon
// ==/UserScript==
if(window.top != window.self) {
@sauyon
sauyon / getstrokes.py
Last active August 29, 2015 14:10
Stroke getter
#!/usr/bin/env python3
import sys
import binascii
import string
import codecs
import xml.etree.ElementTree as ET
import collections
stroketypes = {
@sauyon
sauyon / bootstrap.sh
Last active January 20, 2016 06:36
Sauyon's Arch Linux Bootstrap
#!/bin/bash
usage() {
cat <<EOF
USAGE: bootstrap.sh USERNAME
EOF
}
getrep() {
read -p "$1"
@sauyon
sauyon / PKGBUILD
Last active January 20, 2016 06:21
powerline font PKGBUILD
# Maintainer: Caleb Maclennan <[email protected]>
# Contributor: Sauyon Lee <[email protected]>
pkgname=powerline-fonts
_tag=2015-12-04
pkgver=20151204
pkgrel=1
depends=('fontconfig' 'xorg-font-utils')
url=('https://github.com/powerline/fonts')
license='CPL'
define("util/ob", ["jquery"], function(a) {
var b = this,
c = 0,
d = 1,
e = 2,
f = "",
g = " ",
h = '"',
i = "#",
j = "*",
{
quodlibet-xine = callPackage ../applications/audio/quodlibet {
xineBackend = true;
keybinder3 = null;
gtksourceview = null;
libmodplug = null;
kakasi = null;
libappindicator-gtk3 = null;
};
@sauyon
sauyon / key
Created November 10, 2017 07:23
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINnH9KtWUOFPUqHDEQuucg2dyDYcJDVlo8aH/cHpgWko sauyon@byakuren