Skip to content

Instantly share code, notes, and snippets.

View piotrklibert's full-sized avatar

Piotr Klibert piotrklibert

View GitHub Profile
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;
(define-jabber-alert macos
"Displays message using terminal-notifier app on Mac OS"
(defun terminal-notifier-notify (message &optional title)
"Show a message with `terminal-notifier-command`."
(start-process "terminal-notifier"
piotrklibert / pln.nim
Created October 11, 2016 13:34
Nim json handling
# 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
(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))))