I hereby claim:
- I am Gosha on github.
- I am gosha (https://keybase.io/gosha) on keybase.
- I have a public key whose fingerprint is E33A D016 21C4 5F21 67F3 27AE ED56 EA90 C2BE 6C14
To claim this, I am signing this object:
# Insert file paths chosen with ranger | |
# Default bound to <c-p> | |
# If cursor is on a file, press either <enter> or <a-enter> to finish | |
# If cursor is on a directory, press <a-enter> to finish | |
ranger-insert-files-widget () { | |
local tmpfile=$(mktemp) | |
ranger --choosefiles=${tmpfile} --cmd "map <a-enter> execute_file a" < $TTY | |
local files=$(cat $tmpfile | while read line | |
do | |
local item=$(realpath --no-symlinks --relative-to=$(pwd) "${line}") |
#!/bin/bash | |
set -e | |
echo ================ build | |
"/nix/store/71lbsnxpbnqkhndcxg1fcwxvjxmviqlg-clang-7.1.0/bin/clang-7" \ | |
-cc1 \ | |
-triple x86_64-apple-macosx10.12.0 \ | |
-Wdeprecated-objc-isa-usage \ | |
-Werror=deprecated-objc-isa-usage \ | |
-emit-obj \ | |
-disable-free \ |
obj/ | |
bin/ | |
out/ | |
.git/ | |
.vscode/ |
#!/usr/bin/env python3 | |
# A classic example: | |
# create_increaser_by(num) returns a new function, the returned function adds num to it's arg | |
def create_increaser_by(num): | |
# This function is weirdly named because it's returned later on. | |
# It's not the name it will be called by | |
def _return_fun(arg): | |
return arg + num |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
BINARY="01001000 | |
01100101 | |
01101100 | |
01101100 | |
01101111" | |
binaryToText() { | |
while read line | |
do |
#!/bin/bash | |
# Called with ./image_ratio.sh IMAGEFILE | |
# convert is from ImageMagick | |
image_width () { | |
convert "$1" -format "%w" info: | |
} | |
image_height () { | |
convert "$1" -format "%h" info: | |
} |
# http://en.wikipedia.org/wiki/Mutual_recursion | |
bool is_even(unsigned int n) | |
if (n == 0) | |
return true; | |
else | |
return is_odd(n - 1); | |
bool is_odd(unsigned int n) | |
if (n == 0) |