This file contains hidden or 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
#define STRING_MAX_LENGTH 256 | |
void read_some_input_snipper { | |
char *result; | |
char *name; | |
char buf[STRING_MAX_LENGTH]; | |
fgets(buf, sizeof(buf), stdin); | |
ssprintf(buf, "%s%[^\n]", name, result); | |
} |
This file contains hidden or 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
(defun set-russian-language () | |
(interactive) | |
(set-input-method "russian-computer") | |
(ispell-change-dictionary "ru")) | |
(defun set-english-language () | |
(interactive) | |
;; todo remove this ugly hack someday | |
(set-input-method "russian-computer") |
This file contains hidden or 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
;; Common use of third-party function looks like that: | |
(evilified-state-evilify-map | |
:mode some-emacs-mode | |
:bindings | |
(kdb "C-c a") 'function1 | |
(kdb "C-c b") 'function2) | |
;; I want to declare function or macro that will produce such bindings |
This file contains hidden or 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
function table_save(table, filename) | |
local file = fs.open("w", filename) | |
local data = textutils.serialize(table) | |
file.write(data) | |
file.close() | |
end | |
function table_load(filename) | |
local file = fs.open("r", filename) | |
local data = file.readAll() |
NewerOlder