Skip to content

Instantly share code, notes, and snippets.

View mcfiredrill's full-sized avatar
💭
working on datafruits

Tony Miller mcfiredrill

💭
working on datafruits
View GitHub Profile
@Burgestrand
Burgestrand / download-progress.rb
Created June 27, 2010 13:55
Ruby HTTP file download with progress measurement
require 'net/http'
require 'uri'
def download(url)
Thread.new do
thread = Thread.current
body = thread[:body] = []
url = URI.parse url
Net::HTTP.new(url.host, url.port).request_get(url.path) do |response|
@mebens
mebens / camera.lua
Created May 8, 2011 20:52
Example code for part 3 of my Cameras in Love2D tutorial series.
camera = {}
camera._x = 0
camera._y = 0
camera.scaleX = 1
camera.scaleY = 1
camera.rotation = 0
function camera:set()
love.graphics.push()
love.graphics.rotate(-self.rotation)
@estahn
estahn / env.rb
Created July 6, 2011 11:20
Run Cucumber with Selenium RC and a custom Firefox profile
if ENV.key?('SELENIUM_REMOTE')
Capybara.register_driver :selenium do |app|
require 'selenium-webdriver'
profile = Selenium::WebDriver::Firefox::Profile.from_name 'default'
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(:firefox_profile => profile)
Capybara::Selenium::Driver.new(app, { :browser => :remote, :desired_capabilities => capabilities })
end
end
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@pirj
pirj / Gemfile
Created August 17, 2012 10:13
Sinatra streaming + Redis PubSub
source 'https://rubygems.org'
gem 'sinatra'
gem 'sinatra-contrib', require: 'sinatra/streaming'
group :development do
gem 'thin'
gem 'pry-rails'
end
@linjunpop
linjunpop / README.md
Created August 21, 2012 01:15
Rails flash messages with AJAX requests
@minikomi
minikomi / goserv.go
Created September 2, 2012 02:59
Simple static server in go
package main
import (
"flag"
"log"
"net/http"
"os"
)
@tpope
tpope / foremux
Last active August 11, 2016 16:42
#!/usr/bin/env ruby
# Install in PATH as foremux
if %w(help --help -h).include?(ARGV.first)
$stderr.puts <<-help
Usage:
foremux [PROCESS]
Options:
-e, [--env=ENV] # Specify an env file to load, defaults to .env
@minikomi
minikomi / playlist.md
Last active December 18, 2015 21:19
Kidding
  • 1 slam dunk lifestyle knife city
  • 2 Hydra Island Champion
  • 3 Prince Jammy Champion
  • 4 What You Talking About (Roska Remix) Redlight
  • 5 Bowser's Castle Champion
  • 6 Chasing Crazy (Trim remix) BRACKLES feat CHERRI V
  • 7 Do You Mind (Crazy Cousins Remix) Paleface feat. Kyla
  • 8 Buck n Bury (feat. Juiceman) El-B
  • 9 Animal Prints (feat. Okmalumkoolkat) LV
  • 10 Basscone Redlight

My general thoughts on Resque Next is that it should be more of a protocol and an interface than an end-all-be-all solution for delayed work in Ruby, that it should provide at least one implementation for each of the interfaces, but that it should leave further implementation up to third-parties and separate include-if-you-want-it gems (that may be published to either the resque org or elsewhere).

This includes the dependency on Redis. When a consumer out-grows Redis and needs to use a queueing service that has actual, non-emulated queueing semantics, they shouldn't have to rewrite all of their worker code and start over from