Skip to content

Instantly share code, notes, and snippets.

View scottjacobsen's full-sized avatar

Scott Jacobsen scottjacobsen

View GitHub Profile
@scottjacobsen
scottjacobsen / benchmark.rb
Created August 6, 2021 19:43
to_money.format
[6] pry(main)> Benchmark.ips do |x|
[6] pry(main)* x.report("n2c") { number_to_currency(amount) }
[6] pry(main)* x.report("Money") { amount.to_money.format }
[6] pry(main)* x.compare!
[6] pry(main)* end
Warming up --------------------------------------
n2c 1.024k i/100ms
Money 2.076k i/100ms
Calculating --------------------------
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: us-east-1
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
rspec:
runs-on: ubuntu-16.04
steps:
- name: Restore bundle cache
@scottjacobsen
scottjacobsen / out.txt
Created June 3, 2020 00:12
ruby compile
>>> Installing ruby 2.6.6 into /Users/scott/.rubies/ruby-2.6.6 ...
>>> Installing dependencies for ruby 2.6.6 ...
>>> Downloading https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.bz2 into /Users/scott/src ...
>>> Verifying ruby-2.6.6.tar.bz2 ...
>>> Extracting ruby-2.6.6.tar.bz2 to /Users/scott/src/ruby-2.6.6 ...
>>> Configuring ruby 2.6.6 ...
checking for ruby... /usr/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin19.4.0
cat << "EOF"
______ _ _ _ ______ _
| ___ \ (_) | | | | | ___| | |
| |_/ /_ __ _ __ _| |__ | |_ | |_ _ _ _ __ __| |___
| ___ \ '__| |/ _` | '_ \| __| | _| | | | '_ \ / _` / __|
| |_/ / | | | (_| | | | | |_ | | | |_| | | | | (_| \__ \
\____/|_| |_|\__, |_| |_|\__| \_| \__,_|_| |_|\__,_|___/
__/ |
|___/
EOF
@scottjacobsen
scottjacobsen / anonymous-gist.
Created April 10, 2018 18:29
bundle_install
Fetching gem metadata from https://rubygems.org/..........
Fetching rake 12.3.1
Installing rake 12.3.1
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.5
Installing i18n 0.9.5
Fetching minitest 5.11.3
Installing minitest 5.11.3
@scottjacobsen
scottjacobsen / ansible.txt
Last active November 4, 2016 04:41
ansible-whaaa?
# Install pre-built phantom
- name: Unarchive pre-built phantomjs
unarchive: src="https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2" dest=~/ remote_src=yes
fatal: [default]: FAILED! => {"failed": true, "msg": "file or module does not exist: /Users/scott/dev/drifter/https:/bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2"}
@scottjacobsen
scottjacobsen / public_key.asc
Created July 25, 2016 18:34
public gpg key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQGiBEK3TuERBAC32W5JMG1Yr0wFzkf0vT6GdhPyOvmb54kD14JWo0rS/aMAit6R
AYBhCLlit3hdJXP+yJx9nfjw74bTmjj0L/CS6EoBrQzxpW4W7rupeR095ny8zGaF
owJsK32+41f7UNgx3arNFV4wIl0LsRLMx56JCMyfRCrqHOwaW2qK89DE8wCgmvae
zh3lCVIyq9C2xyRlW59rYn8D/22UtZjrTI3OCtwsMlq/+9Rg+vuj+uVFTWrEMi5M
vZ9E18vjCXy+u7qDhKXo23/y4S1jIZS1j/yMCc6+NG2H1tcA+LxeqveokbWDH/rg
GQToy2sC62dPphQXBfyy/Nv7JeErfWJ3SyCV9S6EiHQCc5BQCTvvPhGh/mLVKusD
yKO9A/9wl3UVEeDTiz0ZvHtTIy/cahlYqQMEgHY+Tj2WFOKdWbzNYp7vqmXZKQVu
scott@endor ~/dev/todo% http POST https://autodiscover.microsoft.com/autodiscover/autodiscover.xml (git)-[master]
HTTP/1.1 401 Unauthorized
Cache-Control: private
Content-Length: 0
Date: Fri, 03 Jun 2016 22:02:29 GMT
Server: Microsoft-IIS/8.5
WWW-Authenticate: Basic realm="autodiscover.microsoft.com"
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-AspNet-Version: 4.0.30319
@scottjacobsen
scottjacobsen / handler.clj
Created April 27, 2016 04:01
luminus test fail
(ns guestbook.test.handler
(:require [clojure.test :refer :all]
[ring.mock.request :refer :all]
[guestbook.handler :refer :all]))
(deftest test-app
(testing "main route"
(let [response (app (request :get "/"))]
(is (= 200 200)))
)
E: Failed to fetch https://oss-binaries.phusionpassenger.com/apt/passenger/pool/trusty/main/n/nginx/nginx-common_1.8.0-8.5.0.23~trusty1_all.deb Could not resolve host: oss-binaries.phusionpassenger.com
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get update && /pd_build/redis.sh && apt-get upgrade -y -o Dpkg::Options::="--force-confold" && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100