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
# From the Highline gem, https://github.com/JEG2/highline | |
def get_character( input = STDIN ) | |
raw_no_echo_mode | |
begin | |
input.getbyte | |
ensure | |
restore_mode | |
end |
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
# encoding: utf-8 | |
class String | |
def cyr_downcase | |
self | |
.unpack("U*") | |
.map { |c| if (1040..1071) === c then (c + 32) elsif (1025 == c) then 1105 else c end } | |
.pack("U*") | |
end | |
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
def cons a, b | |
lambda { |pick| | |
return a if pick == 1 | |
return b if pick == 2 | |
} | |
end | |
def car cons | |
cons.call 1 | |
end |
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
def cons(x,y): | |
return lambda pick: x if pick == 1 else y | |
def car(cons): | |
return cons(1) | |
def cdr(cons): | |
return cons(2) |
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
aptitude install iwlwifi wpasupplicant | |
In [ /etc/network/interfaces ] add the following: | |
auto wlan0 | |
iface wlan0 inet dhcp | |
wpa-ssid [ wireless-network ] | |
wpa-psk [ password ] | |
Configure keyboard layout: dpkg-reconfigure keyboard-configuration |
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
;; Exercise 3.2, p. 56 | |
(defun union-in-order (&rest lists) | |
"Returns a union of lsts, preserving the order" | |
(remove-duplicates (reduce #'append lists) | |
:from-end t | |
:test #'equal)) | |
;; Exercise 3.3, p. 56 | |
(defun sort-by-frequency (list) | |
"Returns sorted by frequency alist of occurrences, |
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
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/")) | |
backup-by-copying 1 | |
auto-save-default 0 | |
inhibit-splash-screen 1 | |
ring-bell-function 'ignore | |
coding-system-for-write 'utf-8 | |
coding-system-for-read 'utf-8 | |
inferior-lisp-program "/usr/local/bin/sbcl --noinform") | |
(set-language-environment "Russian") |
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
{ | |
"workbench.sideBar.location": "right", | |
"editor.minimap.enabled": false, | |
"workbench.statusBar.feedback.visible": false, | |
"editor.tabSize": 2, | |
"editor.renderIndentGuides": false, | |
"editor.detectIndentation": false, | |
"html.format.indentInnerHtml": true, | |
"terminal.integrated.macOptionIsMeta": true, | |
"explorer.confirmDelete": false, |
I hereby claim:
- I am fadeev on github.
- I am fadeev (https://keybase.io/fadeev) on keybase.
- I have a public key ASCLEPVE0l2nhHEREkYXZWAuB3hDJbryWAaKclgGiTevTwo
To claim this, I am signing this object:
OlderNewer