Skip to content

Instantly share code, notes, and snippets.

View diath's full-sized avatar
💭
whoami | xargs pkill -9 -u

diath

💭
whoami | xargs pkill -9 -u
View GitHub Profile
@diath
diath / pasted.py
Created October 22, 2019 14:55
Upload script for paste.diath.net
# alias pasted="PASTE_D_TOKEN=<TOKEN> python pasted.py --exposure private --notify --simple"
import argparse
import enum
import os
import sys
import requests
Link = "https://paste.diath.net"
Endpoint = "https://paste.diath.net/api"
@diath
diath / D1.py
Last active December 25, 2017 18:31
Advent of Code, 2017, Python
from util import get_input, test, run
def main():
input = get_input(1)
def peek_next(s, pos):
if pos == len(s) - 1:
return s[0]
return s[pos + 1]
@diath
diath / update-tibia.sh
Last active August 31, 2017 16:29
Tibia 11 client updater for Linux
#!/usr/bin/env bash
set -u
for i in "$@"; do
case $i in
-r|--resume)
RESUME=1
shift
;;
@diath
diath / D10P1.py
Last active December 3, 2017 14:16
Advent of Code, 2016, Python
import re
RE_VALUE = re.compile(r'value (\d+) goes to bot (\d+)')
RE_GIVES = re.compile(r'bot (\d+) gives low to (bot|output) (\d+) and high to (bot|output) (\d+)')
CHIP_VAL_A = 61
CHIP_VAL_B = 17
def main():
data = []
@diath
diath / D10P1.lua
Last active December 3, 2017 14:16
Advent of Code, 2015, Lua
-- NOTE: Input as a table sequence
local str = {}
local getOutput = function(str)
local out = {}
local curr, next = -1, -1
local counter = 1
for i = 1, #str do
curr = str[i]

Keybase proof

I hereby claim:

  • I am diath on github.
  • I am diath (https://keybase.io/diath) on keybase.
  • I have a public key whose fingerprint is 71FB 58F8 D2C0 F0E0 8DE2 76AE CAF4 DA12 048D 9725

To claim this, I am signing this object: