I hereby claim:
- I am patricktulskie on github.
- I am ptulskie (https://keybase.io/ptulskie) on keybase.
- I have a public key ASBCrp2eBktiU8omJ-YOzS9aL7sCNSigNY4Qrsl1Vu20nwo
To claim this, I am signing this object:
| require 'net/http' | |
| require 'json' | |
| require 'csv' | |
| require 'thread' | |
| hostname = "localhost" | |
| url = URI('http://#{hostname}/vapi/api2/user/login') | |
| mutex = Mutex.new | |
| # Thread pool size |
| #!/usr/bin/env ruby | |
| puts "Gimme a directory" and exit if ARGV.first.nil? | |
| directory = Dir.new(File.expand_path(ARGV.first)) | |
| directory.each do |file| | |
| next if %w(. ..).include?(file) | |
| if rand(2) == 1 | |
| puts "Deleting #{file}" |
I hereby claim:
To claim this, I am signing this object:
| Lita.configure do |config| | |
| # ... | |
| config.handlers.victor_ops.api_id = "API_ID" | |
| config.handlers.victor_ops.api_key = "API_KEY" | |
| end |
| class Pool | |
| attr_accessor :size, :jobs | |
| def initialize(size: 6) | |
| @size = size | |
| @jobs = Queue.new | |
| @pool = Array.new(@size) do |i| | |
| spawn_thread(i) | |
| end |
| class Parent | |
| def derp | |
| puts "Parent Derp" | |
| end | |
| end | |
| class Child < Parent | |
| class New | |
| def new | |
| self.class | |
| end | |
| def to_s | |
| 'new' | |
| end | |
| end |
| class Array | |
| def shotgun_sort | |
| sorted = false | |
| arry = self.dup | |
| iteration = 0 | |
| while !sorted do | |
| puts "Attempt #{iteration += 1}" if $debug | |
| arry.shuffle! | |
| sorted = arry.each_cons(2).all? { |a, b| (a <=> b) <= 0 } |
| #!/usr/bin/ruby | |
| # Create display override file to force Mac OS X to use RGB mode for Display | |
| # see http://embdev.net/topic/284710 | |
| require 'base64' | |
| data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
| edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
| vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
| :~ patrick$ rvm --debug install ree | |
| ree - install | |
| Searching for binary rubies, this might take some time. | |
| Remote file does not exist https://rvm.io/binaries/osx/10.9/x86_64/ree-1.8.7-2012.02.tar.bz2 | |
| Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ree-1.8.7-2012.02.tar.bz2 | |
| Remote file does not exist http://binaries.rubini.us/osx/10.9/x86_64/ree-1.8.7-2012.02.tar.bz2 | |
| rvm_remote_server_url3 not found | |
| No remote file name found | |
| No binary rubies available for: osx/10.9/x86_64/ree-1.8.7-2012.02. | |
| Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. |