This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traceback | |
import sys | |
def a(): | |
b() | |
def b(): | |
c() | |
def c(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function returnValue() { | |
return "Ha!"; | |
} | |
function returnFalse() { | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
class A(dict): | |
def __contains__(self, k): | |
return k in self | |
a = A() | |
a['a'] = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ] }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
run-ctl() { | |
RABBITMQ_LOG_BASE=./logs RABBITMQ_MNESIA_BASE=./mnesia RABBITMQ_NODENAME=dead-user-test@localhost RABBITMQ_NODE_PORT=11915 ERL_LIBS=./deps ./scripts/rabbitmqctl "$@" | |
} | |
run-server() { | |
RABBITMQ_LOG_BASE=./logs RABBITMQ_MNESIA_BASE=./mnesia RABBITMQ_NODENAME=dead-user-test@localhost RABBITMQ_NODE_PORT=11915 ERL_LIBS=./deps ./scripts/rabbitmq-server | |
} |
OlderNewer