Skip to content

Instantly share code, notes, and snippets.

View joshk's full-sized avatar
🥸

Josh Kalderimis joshk

🥸
  • Valued
  • Wellington, NZ
  • 08:37 (UTC +02:00)
View GitHub Profile
- - 199.182.120.10
- - 199.182.120.9
- - 199.182.120.11
- - 199.182.120.8
- 199.182.120.16
- - 199.182.120.13
- - 199.182.120.17
- - 199.182.120.14
- - 199.182.120.146
- 199.182.120.19
Ashburn v4
================
199.91.168.0/22
199.182.120.0/22
173.247.96.0/21
Ashburn v6
===================
2607:F700:8000::/33
~$ ARCHFLAGS='-arch i386 -arch x86_64'
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes
~/RubyCocoa-1.0.0$ ruby install.rb setup
~/RubyCocoa-1.0.0$ sudo ruby install.rb install
require 'test_helper'
class UsersTest < ActionController::IntegrationTest
setup do
reset!
@conn = Faraday::Connection.new do |b|
b.adapter :action_dispatch, @integration_session
b.response :rails_json
end
end
# Include an anonymous module
#
# Useful for defining a class with a base module. So, instead of:
#
# class Foo
# module Base
# def bar
# # ...
# end
# end
module Kernel
alias_method :_original_require, :require
def require(*args)
puts "[!] OMG, yet another dependency: #{args.inspect}"
_original_require(*args)
end
end
@jeroenvandijk
jeroenvandijk / Instructions.md
Created February 22, 2011 11:44
Search for strings in your gems

Search for strings in your gems

Prerequisites

  • you should use bundler

  • ack should be installed

    brew install ack

Command

@alloy
alloy / NSURLConnection.rb
Created March 24, 2011 14:16
MacRuby NSURLConnection example.
framework 'AppKit'
class Download
attr_reader :response, :responseBody
def start(request)
puts "START!"
NSURLConnection.connectionWithRequest(request, delegate:self)
end
@jeroenvandijk
jeroenvandijk / ack.rb
Created June 18, 2011 19:41
ack your gems
#!/usr/bin/env ruby
# Usage:
#
# ./ack.rb your-query
require 'rubygems'
require 'bundler'
if query = ARGV[0]
gem_dirs = Bundler.load.specs.map(&:full_gem_path).join(' ')