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 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"
@deepj
deepj / upgrade_to_refinery_two.rb
Created Jul 30, 2012 — forked from craigambrose/upgrade_to_refinery_two.rb
Migration to convert from refinery 1.0.8 to refinery 2.0
View upgrade_to_refinery_two.rb
class UpgradeToRefineryTwo < ActiveRecord::Migration
def self.up
# For refinerycms-authentication
rename_table :roles_users, :refinery_roles_users
rename_table :roles, :refinery_roles
rename_table :user_plugins, :refinery_user_plugins
rename_table :users, :refinery_users
remove_column :refinery_users, :persistence_token
remove_column :refinery_users, :perishable_token
remove_column :refinery_users, :remember_token
@deepj
deepj / apns.rb
Created Apr 17, 2012 — forked from scotttam/apns.rb
Sends an Apple Push Notification with Ruby
View apns.rb
require "rubygems"
require "yajl"
require "openssl"
require "socket"
device_token = '39cac56f 986a0e66 3c4fd4f4 68df5598 024d2ca3 8b9f307c 741c180e 9fc30c62'
device_token = device_token.gsub(" ", "")
the_byte_token = [device_token].pack("H*")
file = File.open("ruby_the_byte_token", "wb")