Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
from pprint import pprint
import sys
import requests
TOKEN = '' # replace
OWNER = 'benchling'
REPO = 'aurelia'
@raylu
raylu / shell.py
Last active March 29, 2022 07:02
shell starter
#!/usr/bin/env python3
import os
while True:
line = input('> ')
os.execvp(line, [line])
# 0. run this code and try `ls` to make sure that much works
# 1. handle arguments (`ls /`)
@raylu
raylu / httpd.py
Created June 8, 2020 21:46
starter code for httpd on https://www.raylu.net/systems/
#!/usr/bin/env python3
# so you want to write an HTTP server?
#
# 1. run `curl --trace-ascii http.log httpbin.org/html` and read http.log
# 2. run this code and try it in curl and your browser
# 3. good luck!
#
# here are some extra features to add:
#
@raylu
raylu / Makefile
Last active November 9, 2019 12:39
Go question
go: go.c
gcc -o go -O go.c -Wall -Wextra -std=c11 -ggdb
@raylu
raylu / cVimrc
Last active March 13, 2019 17:44
cVimrc
set nosmoothscroll
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map t :tabnew!<Space>
map p ;
let blacklists = ["http://www.typingclub.com/*","http://www.keybr.com/*","http://en.lichess.org/*","http://vim-adventures.com/*","http://airbnb.io/*","https://coderpad.io/*","https://app.codesignal.com/*"]
#!/usr/bin/env python3
import ctypes
import ctypes.util
import enum
import os
import sys
def main():
libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
#!/usr/bin/env python3
import ctypes
import ctypes.util
import errno
import os
import signal
libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
#!/usr/bin/env python3
# vim: set sw=4 ts=4:
import eventlet
eventlet.monkey_patch()
import socket
import _thread
def main():
@raylu
raylu / keybase.md
Created February 8, 2017 21:12
keybase.md

Keybase proof

I hereby claim:

  • I am raylu on github.
  • I am raylu (https://keybase.io/raylu) on keybase.
  • I have a public key whose fingerprint is 86AD 8A28 B07B 3DC8 19EA D5E0 8AE5 9930 FEFD 609B

To claim this, I am signing this object:

CFLAGS=-O2 -std=c11 -march=native -ggdb -pipe -Wall -Wextra -Wshadow
test: test.o
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
clean:
rm -f *.o
rm -f test
.PHONY: clean