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
# Gemfile | |
gem 'redis', '~> 3.0.1' | |
gem 'hiredis', '~> 0.4.5' |
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
# Gemfile | |
gem 'sidekiq' |
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
# app/controllers/home_controller.rb | |
class HomeController < ApplicationController | |
def index | |
@news = News.get_recent | |
@notifications = current_user.notifications | |
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
// rotate 90° CW: flip the transpose on Y | |
inline void rotate90CW(cv::Mat& input) | |
{ | |
cv::flip(input.t(), input, 1); | |
} | |
// rotate -90° CW: flip the transpose on X | |
inline void rotate90CCW(cv::Mat& input) | |
{ | |
cv::flip(input.t(), input, 0); |
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
ruby-1.9.1-p378 > tree = parser.parse "field :ciccio, 'integer'" | |
=> SyntaxNode+Field1+Field0 offset=0, "...d :ciccio, 'integer'" (construct,sp,name,s1,s2,interpretation): | |
SyntaxNode offset=0, "field" | |
SyntaxNode offset=5, " ": | |
SyntaxNode offset=5, " " | |
SyntaxNode offset=6, ":" | |
SyntaxNode offset=7, "ciccio": | |
SyntaxNode offset=7, "c" | |
SyntaxNode offset=8, "i" | |
SyntaxNode offset=9, "c" |
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
ruby-1.9.1-p378 > tree = parser.parse "field :ciccio, 'integer'" | |
=> SyntaxNode+Field1+Field0 offset=0, "...d :ciccio, 'integer'" (construct,sp,name,s1,s2,interpretation): | |
SyntaxNode offset=0, "field" | |
SyntaxNode offset=5, " ": | |
SyntaxNode offset=5, " " | |
SyntaxNode offset=6, ":" | |
SyntaxNode offset=7, "ciccio": | |
SyntaxNode offset=7, "c" | |
SyntaxNode offset=8, "i" | |
SyntaxNode offset=9, "c" |
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
%div.example | |
foo | |
:coffeescript | |
alert "I have #{@count} posts" |
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
namespace :release do | |
task :js => :environment do | |
puts "Compiling coffeescript to javascript..." | |
[...] | |
File.open("#{release_dir}/example.js", 'w') do |file| | |
file.write CoffeeScript.compile(File.read("#{dev_dir}/example.coffee")) | |
end | |
puts "Coffeescript compiled" | |
puts "Closure Compiler: minifying" |
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
test = (input) -> | |
alert input | |
test 'hello' |
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 'usb' | |
require 'betabrite' | |
### | |
# Get a betabrite sign: | |
# | |
# http://www.betabrite.com/ | |
# http://www.amazon.com/Brite-Prism-Moving-Message-Display/dp/B000MQAI72 | |
# | |
# Install gems: |
OlderNewer