Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Used to graph results from autobench | |
# | |
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv | |
# | |
# This will generate three svg & png graphs | |
require "rubygems" | |
require "scruffy" | |
require 'csv' | |
require 'yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'fileutils' | |
# upload with: | |
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename | |
post '/:name/:filename' do | |
userdir = File.join("files", params[:name]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Demo < Prawn::Document | |
def flower | |
0.step(270, 90) do |angle| | |
rotate(angle, :origin => [100, 100]) do | |
fill_color(random_color) | |
polygon [100, 100], [150, 150], [200, 100] | |
fill_and_stroke | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/omniauth.rb | |
module OmniAuth | |
module Strategies | |
# tell OmniAuth to load our strategy | |
autoload :Pixelation, 'lib/pixelation_strategy' | |
end | |
end | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :twitter, "app_name", "secret" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice ruby-indent-line (after unindent-closing-paren activate) | |
(let ((column (current-column)) | |
indent offset) | |
(save-excursion | |
(back-to-indentation) | |
(let ((state (syntax-ppss))) | |
(setq offset (- column (current-column))) | |
(when (and (eq (char-after) ?\)) | |
(not (zerop (car state)))) | |
(goto-char (cadr state)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# https://github.com/mattetti/googlecharts | |
# http://mattetti.github.com/googlecharts/ | |
# | |
# Install: | |
# gem install googlecharts | |
# | |
# GitHub Flavord Markdown: | |
# ![chart title](http://chart.apis.google.com/chart?...) |
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Revision: 2012-06-06 | |
### Overview | |
Don't be a leech. Swagger over to the Apple Store and pony up ~$30 for the | |
retail Mac OS X Snow Leopard install DVD. Don't whine, just do it. | |
There are a number of blog posts dealing with installing either Snow Leopard or | |
Lion in VirtualBox. None of them worked for my Win7 Ultimate 32bit Dell Studio | |
15 system with a paltry 4GB. Yes, I've been holding out a new Ivy Bridge system |
Ruby 2.0 is around the corner, estimated to be launch February 2013, for its 20th anniversary!
Wouldn't be great to be able to test Ruby 2.0 features and report possible bugs?
Things like Refinements, built-in ANSI coloring for Windows or even better, faster startup
Users of other OS like Linux and OSX already can install upcoming versions of RUby thanks to RVM and rbenv tools, but what about Windows?
OlderNewer