Skip to content

Instantly share code, notes, and snippets.

View binarin's full-sized avatar

Alexey Lebedeff binarin

  • Almere, The Netherlands
View GitHub Profile
packageOverrides = super: {
xorg = super.xorg // rec {
xkeyboard_config_dvp = super.pkgs.lib.overrideDerivation super.xorg.xkeyboardconfig (old: {
patches = [
(builtins.toFile "ru-dvp.patch" ''
--- xkeyboard-config-2.16-orig/symbols/ru 2014-12-11 01:56:38.000000000 +0300
+++ xkeyboard-config-2.16/symbols/ru 2016-04-15 14:27:25.075214654 +0300
@@ -719,3 +719,24 @@
key <TLDE> { [ bracketright, bracketleft ] };
key <BKSL> { [ Cyrillic_io, Cyrillic_IO ] };
#!/usr/bin/env escript
make_big_term() ->
Reused = lists:seq(1, 10000),
[ Reused || _ <- lists:seq(1, 1000) ].
main([]) ->
Term = make_big_term(),
io:format("PARENT: ~p - ~p~n", [byte_size(term_to_binary(Term)), erlang:process_info(self(), memory)]),
spawn(fun() ->
(require 'ob)
(require 'ob-eval)
(defvar org-babel-default-header-args:seqdiag
'((:results . "file") (:exports . "results"))
"Default arguments to use when evaluating a seqdiag source block.")
(defun org-babel-expand-body:seqdiag (body params)
"Expand BODY according to PARAMS, return the expanded body."
(let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
# -*- coding: utf-8 -*-
import sys
import datetime
import calendar
def make_gps_time(bcd_date, bcd_milliseconds):
year = bcd_date % 100;
mon = (bcd_date // 100) % 100;
day = bcd_date // 10000;
(require 'cl)
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(unless (package-installed-p 'dash)
(package-refresh-contents)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class A(dict):
def __contains__(self, k):
return k in self
a = A()
a['a'] = 10
<?php
function returnValue() {
return "Ha!";
}
function returnFalse() {
return false;
}
import traceback
import sys
def a():
b()
def b():
c()
def c():
@binarin
binarin / .gitignore
Created February 25, 2010 23:40 — forked from dgladkov/mapglue.py
*~