Skip to content

Instantly share code, notes, and snippets.

View isoraqathedh's full-sized avatar

isoraqathedh

View GitHub Profile
@isoraqathedh
isoraqathedh / docs.md
Created May 19, 2017 11:50
rofi-docs

Title: How to write modi scripts ...

rofi can call a script as a modi. To do this your script must do the following:

  1. The last argument of the script is reserved for rofi. It must be allowed to be omitted.
  2. When the mode is first activated,
@isoraqathedh
isoraqathedh / graphlang.txt
Created May 22, 2017 17:11
A node-based programming language
copy NodeBuilder Fib;
{
copy Int x;
-> x;
(
(x, 1) -> eq,
{
1 ->;
},
{
#!/bin/zsh
lunar |
sed -n "s/[^0-9]/ /g;4p;6p" |
xargs |
awk '{printf "%c%c%02i.%02i%c\n", $5 + 64, $6 + 64, $2, $3, $12 + 96}'
# Format: < Format string > < Year > <M> <D> < Hour >
@isoraqathedh
isoraqathedh / get.lisp
Created July 16, 2017 16:49
Grab currency information.
#!/usr/local/bin/sbcl --script
(load "~/quicklisp/setup.lisp")
(ql:quickload '(:yason :drakma) :silent t)
(let ((drakma:*text-content-types* `(("application" . "json")
("text" . "json")
,@drakma:*text-content-types*))
(yason:*parse-object-as* :alist))
(with-open-file (s (make-pathname :name "cache"
:type "conf"
#!/usr/bin/python3
import configparser
import os
try:
configFile = os.path.dirname(os.path.realpath(__file__)) + '/warnings.conf'
except NameError:
configFile = os.path.dirname(os.path.realpath(
"~/.config/i3blocks/blocks/wwarn")) + '/warnings.conf'
@isoraqathedh
isoraqathedh / disp.sh
Created July 26, 2017 13:44
Reddit Karma Printer (+ coloured deltas)
#!/bin/zsh
here=$(dirname ${(%):-%N})
case $BLOCK_BUTTON in
1)
sed -i -n '2p;2p' $here/cache.conf;;
4)
i3-msg 'workspace prev_on_output'
exit 1
;;
@isoraqathedh
isoraqathedh / Drsk-pages.txt
Created September 30, 2017 00:29
Filenames of all Drsk pages
./Book 23/01a-Dr-Introduction.jpg
./Book 23/02a-Dr-Inventory and syllable structure.jpg
./Book 23/03a-Dr-Vowel insertion.jpg
./Book 23/04a-Dr-Phonoruns.jpg
./Book 23/05a-Dr-Orthography.jpg
./Book 23/06a-Dr-Phonotactics.jpg
./Book 23/10a-Dr-Noun morphology.jpg
./Book 23/11a-Dr-Toponymy.jpg
./Book 23/12a-Dr-Digits.jpg
./Book 23/13a-Dr-CAT SMAJ and CAT STAR.jpg
@isoraqathedh
isoraqathedh / disp.py
Created December 3, 2017 14:38
Sun clock
#!/usr/bin/python3
import os
import sys
import ephem
import datetime
import pytz
import colorlover as colours
import yaml
import math
@isoraqathedh
isoraqathedh / custom.el
Created December 3, 2017 19:11
Spolsky white line fix
;; Add these faces to custom. I don't know how to set them otherwise.
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(window-divider ((t (:foreground "#161A1F"))))
'(window-divider-first-pixel ((t (:foreground "#161A1F"))))
'(window-divider-last-pixel ((t (:foreground "gray20")))))
@isoraqathedh
isoraqathedh / clementine-i3.sh
Created December 5, 2017 17:45
A display script for Clementine.
#!/bin/bash
# prints now playing from Clementine
# Clicking on the button changes the output.
display=/tmp/clnp
case $BLOCK_BUTTON in
1) # Left click cycles the display
case "$(< $display)" in
"title") echo "album" > $display;;
"album") echo "artist" > $display;;