Skip to content

Instantly share code, notes, and snippets.

View xandkar's full-sized avatar
🤔
quis custodiet ipsos custodes?

Siraaj Khandkar xandkar

🤔
quis custodiet ipsos custodes?
View GitHub Profile
open SCaml;;
type amount = tz;;
type dest = unit contract;;
type threshold = nat;;
type keys = key list;;
type action =
| Transfer of amount * dest
| Change_keys of threshold * keys
open SCaml
type action =
| Transfer of {amount: tz; dest: unit contract}
| Delegate of key_hash option
| ChangeKeys of {threshold : nat; keys : key list}
type parameter =
{counter: nat; action: action; sigs : signature option list}
@xandkar
xandkar / ircbotframe.py
Created March 28, 2021 18:14 — forked from TerrorBite/ircbotframe.py
Python IRC chat bridge for Vanilla Minecraft
import socket
import threading
import re
import time
class ircOutputBuffer:
# Delays consecutive messages by at least 1 second.
# This prevents the bot spamming the IRC server.
def __init__(self, irc):
self.waiting = False
@xandkar
xandkar / gist:e1186acb0b4fd42cf495cd9fb17f0d23
Created June 27, 2019 01:07 — forked from Spoygg/gist:3122226
Keyboard switches for XKB setxkbmap
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)
@xandkar
xandkar / gist:20dd9fc20cf1543e59009e568d2af25d
Created June 27, 2019 01:07 — forked from Spoygg/gist:3122226
Keyboard switches for XKB setxkbmap
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)
@xandkar
xandkar / init.c
Created January 17, 2019 20:15 — forked from rofl0r/init.c
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@xandkar
xandkar / systemd.erl
Created July 27, 2018 17:09 — forked from maxlapshin/systemd.erl
Systemd support
-module(systemd).
% This is what you need to adopt systemd in erlang
%
% Do whatever you want license. If you want, you can take this code under terms of MIT license.
-export([ready/0, reloading/0, stopping/0, watchdog/0]).
-export([start_link/0]).
-export([init/1, handle_info/2, terminate/2]).
@xandkar
xandkar / notes.md
Created March 17, 2018 20:14 — forked from aerosol/notes.md
The Year Of Linux Desktop

PC

  • LG 27UD69P-4k
    • expecting 2.0 1080p worst case
  • Crystal Series case 570X RGB
  • Silent Loop 360 water cooler
  • 750W Straight Power 11
  • Ryzen Threadripper 1920X
  • X399 Aorus Gaming 7 mobo
  • 16GB 3000MHz XPG Dazzle CL16
#!/bin/bash
W=`xdotool getactivewindow`
S1=`xprop -id ${W} |awk -F '"' '/WM_CLASS/{print $4}'`
echo "$S1" >> /tmp/log.txt
if [ "$S1" = "Firefox" ]; then
xdotool keydown --window ${W} Ctrl+t
fi
@xandkar
xandkar / springer-free-maths-books.md
Created December 29, 2015 13:18 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links