I hereby claim:
- I am michaelherold on github.
- I am michaeljherold (https://keybase.io/michaeljherold) on keybase.
- I have a public key ASC2imTPK_PBmFPtZknSKzIW-Dm8pqH3Bws2DiYaWE99Uwo
To claim this, I am signing this object:
| # This was discovered on the following blog post: | |
| # http://liquidat.wordpress.com/2008/10/17/short-tip-gnu-screen-with-proper-scroll-session-management-support/ | |
| termcapinfo xterm* ti@:te@ | |
| # Also from that post is caption support, which is nice to have | |
| caption always # activates window caption | |
| caption string '%{= wk}[ %{k}%H %{k}][%= %{= wk}%?%-Lw%?%{r}(%{r}%n*%f%t%?(%u)%?%{r})%{k}%?%+Lw%?%?%= %{k}][%{b} %d/%m %{k}%c %{k}]' # good looking window bar | |
| bindkey -k k5 prev # F5 for previous window | |
| bindkey -k k6 next # F6 for next window |
| #!/bin/sh | |
| # This amazing little snippet saved me so much time | |
| # Sourced from http://askubuntu.com/questions/85641 | |
| sudo apt-get clean | |
| cd /var/lib/apt | |
| sudo mv lists lists.old | |
| sudo mkdir -p lists/partial | |
| sudo apt-get clean | |
| sudo apt-get update |
| ruby-2.0.0 (main)> client = Twitter::REST::Client.new do |config| | |
| config.consumer_key = <snip>, | |
| config.consumer_secret = <snip> | |
| end | |
| => #<Twitter::REST::Client:0x0000000749a370> | |
| ruby-2.0.0 (main)> tweet = client.status(381940500032258049) | |
| => #<Twitter::Tweet:0x00000007752770> | |
| ruby-2.0.0 (main)> uri = Twitter::Entity::URI.new(tweet.attrs[:entities][:urls][0]) | |
| => #<Twitter::Entity::URI:0x00000007061808> | |
| ruby-2.0.0 (main)> uri.display_url |
| Unhandled rejection TypeError: Cannot read property 'toString' of null | |
| at defaultKey (/home/herold/code/project/node_modules/gulp-cache/index.js:17:39) | |
| at objectAssign._getFileKey (/home/herold/code/project/node_modules/gulp-cache/lib/TaskProxy.js:56:32) | |
| at objectAssign._checkForCachedValue (/home/herold/code/project/node_modules/gulp-cache/lib/TaskProxy.js:68:21) | |
| at objectAssign.processFile (/home/herold/code/project/node_modules/gulp-cache/lib/TaskProxy.js:24:21) | |
| at DestroyableTransform._transform (/home/herold/code/project/node_modules/gulp-cache/index.js:83:19) | |
| at DestroyableTransform.Transform._read (/home/herold/code/project/node_modules/gulp-cache/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10) | |
| at DestroyableTransform.Transform._write (/home/herold/code/project/node_modules/gulp-cache/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12) | |
| at doWrite (/home/herold/code/project/node_modules/gulp-cache/node_mo |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| #!/usr/bin/env ruby | |
| hits = [] | |
| checks = { | |
| #'_spec\.rb$' => ['focus:[:space:]*true'], | |
| '\.rb$' => ['binding\.pry', 'debugger'] | |
| } | |
| # Find the names of all the filenames that have been (A)dded (C)opied or (M)odified | |
| filenames = `git diff --cached --name-only --diff-filter=ACM`.split("\n") |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| # gem install benchmark-ips benchmark-memory | |
| # ruby benchmark.rb | |
| require "benchmark/ips" | |
| require "benchmark/memory" | |
| Benchmark.ips do |x| | |
| x.report("join") do |
This uses the excellent benchmark-ips library by Evan Phoenix. You'll have to install that with:
gem install benchmark-ips
To do the Rails comparisons, you'll need to be within a Rails environment. The easiest thing would be to save the benchmark script into a Rails project, make sure benchmark-ips is in your Gemfile, and then enter a rails c environment. In the console, enter:
As part of an exercise in figuring out how to derive the continuous equation that is sampled by a discrete function, I went ahead and opened my Numerical Methods textbook and started going through the Newton-Raphson Method. This, plus my first ever tweet storm are the output.