Required tools for playing around with memory:
hexdumpobjdumpreadelfxxdgcore
| # frozen_string_literal: true | |
| require 'axlsx' | |
| require 'rubyXL' | |
| require 'rubyXL/convenience_methods/worksheet' | |
| require 'memory_profiler' | |
| rows = 1_000 | |
| columns = 20 |
| namespace :db do | |
| require 'sequel' | |
| Sequel.extension(:migration) | |
| MIGRATIONS_PATH = 'db/migrations' | |
| def db_conn_env | |
| ENV["BOOKSHELF_DATABASE_URL"] | |
| end |
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.
To get started, install pass and generate a keypair.
$ brew install pass
$ gpg --gen-key
$ gpg --list-keys| module Colors | |
| def colorize(text, color_code) | |
| "\033[#{color_code}m#{text}\033[0m" | |
| end | |
| { | |
| :black => 30, | |
| :red => 31, | |
| :green => 32, | |
| :yellow => 33, |
| function getAverageColourAsRGB (img) { | |
| var canvas = document.createElement('canvas'), | |
| context = canvas.getContext && canvas.getContext('2d'), | |
| rgb = {r:102,g:102,b:102}, // Set a base colour as a fallback for non-compliant browsers | |
| pixelInterval = 5, // Rather than inspect every single pixel in the image inspect every 5th pixel | |
| count = 0, | |
| i = -4, | |
| data, length; | |
| // return the base colour for non-compliant browsers |