Skip to content

Instantly share code, notes, and snippets.

View gist:3c1f85893ef16e618690b6959ef7fa5c
case $(uname -s) in
Linux)
install_package "artichoke-nightly" "https://github.com/artichoke/nightly/releases/latest/download/artichoke-nightly-x86_64-unknown-linux-gnu.tar.gz" artichoke
;;
Darwin)
case $(uname -m) in
arm64)
install_package "artichoke-nightly" "https://github.com/artichoke/nightly/releases/latest/download/artichoke-nightly-aarch64-apple-darwin.tar.gz" artichoke
;;
x86_64)
View nats-client.rb
# frozen_string_literal: true
require 'async/io'
require 'async/io/stream'
require 'async/pool/controller'
require 'async/await'
module Async
module NATS
def self.local_endpoint
View gist:ec830759a514fd65335fb1c8e8f10585
$ NIO4R_PURE=true bundle exec rspec
~/.gem/truffleruby/2.4.4/gems/async-io-1.16.3/lib/async/io/socket.rb:97: warning: shadowing outer local variable - task
~/.gem/truffleruby/2.4.4/gems/async-io-1.16.3/lib/async/io/socket.rb:180: warning: shadowing outer local variable - task
~/dev/bugs/truffleruby/falcon/lib/falcon/verbose.rb:52: warning: shadowing outer local variable - statistics
~/.gem/truffleruby/2.4.4/gems/async-io-1.16.3/lib/async/io/shared_endpoint.rb:29: warning: shadowing outer local variable - endpoint
~/.gem/truffleruby/2.4.4/gems/async-io-1.16.3/lib/async/io/shared_endpoint.rb:70: warning: shadowing outer local variable - task
~/.gem/truffleruby/2.4.4/gems/async-io-1.16.3/lib/async/io/shared_endpoint.rb:88: warning: shadowing outer local variable - task
~/.gem/truffleruby/2.4.4/gems/samovar-1.9.1/lib/samovar/command.rb:97: warning: shadowing outer local variable - rows
~/dev/bugs/truffleruby/falcon/lib/falcon/hosts.rb:223: warning: shadowing outer local variable - task
~/dev/bugs/truffleruby/falc
@deepj
deepj / # go - 2016-08-18_19-38-00.txt
Created Aug 18, 2016
go on Mac OS X 10.12 - Homebrew build logs
View # go - 2016-08-18_19-38-00.txt
Homebrew build logs for go on Mac OS X 10.12
Build date: 2016-08-18 19:38:00
@deepj
deepj / # liblwgeom - 2016-08-02_17-36-01.txt
Created Aug 3, 2016
liblwgeom on Mac OS X 10.12 - Homebrew build logs
View # liblwgeom - 2016-08-02_17-36-01.txt
Homebrew build logs for liblwgeom on Mac OS X 10.12
Build date: 2016-08-02 17:36:01
View gist:9b4c2762d824e9bdd1b3
$ rake spec
/Users/deepj/.rubies/ruby-2.3.0/bin/ruby -I/Users/deepj/.gem/ruby/2.3.0/gems/rspec-core-3.4.3/lib:/Users/deepj/.gem/ruby/2.3.0/gems/rspec-support-3.4.1/lib /Users/deepj/.gem/ruby/2.3.0/gems/rspec-core-3.4.3/exe/rspec --pattern ./\*/spec/\*\*/\*_spec.rb
-- create_table(:refinery_crud_dummies, {:force=>true})
-> 0.0351s
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 56356
....***....***........../Users/deepj/dev/oss/refinerycms/refinerycms/core/app/helpers/refinery/meta_helper.rb:23: warning: Refinery::PagePresenter#respond_to?(:to_ary) is old fashion which takes only one parameter
View debug_system_stack_error.md

This is how I debug SystemStackError when there is no stack trace.

My first attempt was:

begin
  a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
  puts caller
end
View lean-startup-notes.md

The Lean Startup - Notes, Quotes, and Choice Snippets

The Lean Startup

Characteristics of a lean startup:

  1. Uses "platforms enabled by open source and free software."

  2. Agile development

View test_multi_select.rb
=begin
Notes
=====
Labels: On the label you should put a "for" attribute if you're not using something like simple_form
This helps capybara to find your field
e.g. <label for="my_field_id">Some label</label>
=end
field = "Label on my field"
value = "existing option in list"
@deepj
deepj / recipe.rb
Created Oct 29, 2012 — forked from systembell/recipe.rb
S3 File Resource for Chef
View recipe.rb
# Source accepts the protocol region:// with the host as the bucket
# access_key_id and secret_access_key are just that
# for the eu-west-1 region:
s3_file "/var/bulk/the_file.tar.gz" do
source "s3-eu-west-1://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"