I hereby claim:
- I am tonygaetani on github.
- I am tonygaetani (https://keybase.io/tonygaetani) on keybase.
- I have a public key whose fingerprint is 984C EC21 2057 94EF D296 AD3F 436F D09B AD04 F349
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # thank you https://coderwall.com/p/ewk0mq/stop-remove-all-docker-containers | |
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) |
I hereby claim:
To claim this, I am signing this object:
| " show syntax highlighting | |
| syntax enable | |
| " dark theme just like my heart | |
| set background=dark | |
| " show line numbers | |
| set number | |
| " re-enable backspace usage | |
| set backspace=2 | |
| set backspace=indent,eol,start | |
| " use 4 space charachters for indentation |
| import concurrent.futures | |
| import time | |
| def sleep_print_return(input): | |
| print "{} started".format(input) | |
| time.sleep(input % 3) | |
| return input | |
| def main(): | |
| # to observe the difference, change max_workers to 1 |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| HEAD=$(git rev-parse --abbrev-ref HEAD) | |
| if [[ "${HEAD}" == "HEAD" ]]; then | |
| HEAD=$(git rev-parse HEAD) | |
| fi | |
| STASH=0 | |
| if [[ -n $(git status --porcelain) ]]; then |
| #!/bin/sh | |
| # Thank you to Jorge Quilcate Otoya for this helpful script | |
| # https://jeqo.github.io/blog/devops/vagrant-quickstart/ | |
| # size of swapfile in megabytes | |
| swapsize=8000 | |
| # does the swap file already exist? | |
| grep -q "swapfile" /etc/fstab |
| #!/usr/bin/env python | |
| # mac OSX 10.10.3 | |
| # python 2.7.10 (installed with homebrew) | |
| # argparse 1.4.0 | |
| # to test - `python argparseissue.py --help` | |
| # expected - | |
| # usage: issue.py [-h] -f FOO [-b BAR] |
| # increased buffer size | |
| set-option -g history-limit 5000 | |
| # shell | |
| SHELL=bash | |
| set-option -g default-shell /bin/$SHELL | |
| # no delay for escape key press | |
| set -sg escape-time 0 |
| config.vm.provider "virtualbox" do |v| | |
| file_to_disk = './tmp/large_disk.vdi' | |
| unless File.exist?(file_to_disk) | |
| v.customize ['createhd', '--filename', file_to_disk, '--size', 500] # size is in MB | |
| end | |
| v.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
| end |
| (defn pow2 [n] | |
| "Returns a long representing 2^n" | |
| (->> n (Math/pow 2) long)) | |
| (defn b10->b2 | |
| "Converts a base 10 number to a lazy seq of 1's and 0's that make up a base 2 number" | |
| ([n] (b10->b2 n '())) | |
| ([n col] | |
| (if (= 1 n) | |
| (merge col 1) ; base case |