Skip to content

Instantly share code, notes, and snippets.

Avatar

Piotr Klibert piotrklibert

View GitHub Profile
View j.c
typedef char C;
typedef long I;
typedef struct a {
I t, r, d[3], p[2];
} *A;
#define P printf
#define R return
#define V1(f) A f(w)A w;
View notify.el
(define-jabber-alert macos
"Displays message using terminal-notifier app on Mac OS"
'terminal-notifier-notify)
(defun terminal-notifier-notify (message &optional title)
"Show a message with `terminal-notifier-command`."
(start-process "terminal-notifier"
"*terminal-notifier*"
"reattach-to-user-namespace"
"terminal-notifier"
@piotrklibert
piotrklibert / pln.nim
Created Oct 11, 2016
Nim json handling
View pln.nim
#
# PLNizator
#
# Displays an amount of PLN you'd get for given amount of USD. Accepts input via
# command line argument. Without providing a value it defaults to 1.
#
import os
import json
import times
View resize.lisp
(defvar steps (list 50 120 200 300 500))
(defvar current-step-choice 120)
(defun get-next-step (step lst)
(if (= (car lst) step)
(if (not (cdr lst))
(car steps)
(cadr lst))
(get-next-step step (cdr lst))))