Skip to content

Instantly share code, notes, and snippets.

View shintoo's full-sized avatar

Sean Rapp shintoo

View GitHub Profile
@shintoo
shintoo / i3-config
Created September 19, 2019 02:44
i3 config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@shintoo
shintoo / fib.pl0
Created November 17, 2016 20:14
cool or what
var left, right, toggle, n, i;
begin
right := 1;
left := 0;
toggle := 0;
i := 0;
read n;
@shintoo
shintoo / guessing_game.pl0
Created November 15, 2016 15:12
Guess the number!!!!!! dood
const X = 15, L = 0, H = 1;
var a;
begin
a := 1;
while a <> X do begin
read a;
if a < X then begin
@shintoo
shintoo / clipboard_to_qrcode.py
Created August 23, 2016 04:08
Instant QR code from clipboard
#!/usr/bin/env python
import tkinter as tk
import qrcode as qr
import sys
root = tk.Tk();
root.withdraw();
image = qr.make(root.clipboard_get())
image.save(sys.argv[1])
@shintoo
shintoo / bf2c.c
Created May 15, 2016 04:30
brainfuck to C transpiler
#include <stdio.h>
void print_prelude(FILE *output);
int main(int argc, char **argv) {
FILE *src = NULL;
FILE *output;
if (argc != 2) return -1;
char op;
@shintoo
shintoo / fibvm.c
Last active May 7, 2016 01:32
fibvm - mov, add, print the first 16 fibonacci numbers
/* fibvm - a vm for fibonacci numbers < 255
* hex for input file for fibonacci numbers:
* ---
* 01 90 21 90 70 91 51 90 70 91 51 90 71 91 51 90
* 70 91 51 90 70 91 51 90 70 91 51 90 70 91 51 90
* C0
* ---
* equivalent to:
* mov reg0, 1
* print reg0
import java.io.IOException;
import java.util.Scanner;
public class Conway {
public static Field field;
public static int generations;
/**
* @param args
*/
@shintoo
shintoo / batsy.c
Created December 6, 2015 20:35
The simplest battery monitor.
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
FILE *fp;
char buffer[64];
unsigned int max_charge;
unsigned int current_charge;
@shintoo
shintoo / .gtkrc-2.0
Created August 20, 2015 03:38
gtk 2 rc
# Custom styles
gtk-font-name = "tewi 8"
style "gtk-theme-config-panel" {
bg[NORMAL] = "#0c1212"
bg[PRELIGHT] = shade(1.1,"#0c1212")
bg[ACTIVE] = shade(0.9,"#0c1212")
bg[SELECTED] = shade(0.97,"#0c1212")
fg[NORMAL] = "#018184"
@shintoo
shintoo / ff
Created August 20, 2015 02:54
firefox ui
/* AGENT_SHEET */
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#content browser {
margin-right: -14px !important;
overflow-y: hidden;
overflow-x: hidden;
}