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
<link id="font" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600&subset=latin,cyrillic" rel="stylesheet" media="none" onload="setTimeout(function(){document.getElementById('font').setAttribute('media', 'all')}, 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
[{ | |
"field": "children", | |
"op": "EQ", | |
"children": { | |
"0": [{ | |
"field": "infants", | |
"op": "EQ", | |
"children": { | |
"0": [{ | |
"field": "trip_class", |
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
module HotelsApi | |
class Search | |
include NanoApi::Model | |
HOTELSCOMBINED_MAP = { | |
:search => :destination, | |
:file_name => :fileName, | |
:checkin => :depart_date, | |
:checkout => :return_date, | |
:rooms => :rooms, |
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_relative "inet2" | |
puts ARGV | |
cart = Cart.new(ARGV.delete_at(0)) | |
ARGV.each do |argument| | |
@items.each { |item| cart.add_expensive_item(item) if argument == item.name } | |
end | |
cart.save_to_file |
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
>>> window.location.hash = "%25255B"; | |
"%25255B" | |
>>> window.location.hash = window.location.hash; | |
"#%255B" | |
>>> window.location.hash = window.location.hash; |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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 Foo | |
def self.bar | |
puts "Hello, world!" | |
end | |
end | |
module Monkey | |
def self.included(base) | |
base.extend(ClassMethods) | |
base.class_eval do |
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 Foo | |
def bar | |
puts "Hello, world!" | |
end | |
end | |
module Monkey | |
def self.included(base) | |
base.send(:include, InstanceMethods) | |
base.class_eval do |
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
notified << author if author && author.active? && author.notify_about?(self) | |
if assigned_to | |
if assigned_to.is_a?(Group) | |
notified += assigned_to.users.select {|u| u.active? && u.notify_about?(self)} | |
else | |
notified << assigned_to if assigned_to.active? && assigned_to.notify_about?(self) | |
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
Redmine::Plugin.register :redmine_xxx do | |
settings :default => { 'default_tracker_for_new_issue' => Tracker.first.id } | |
end | |
# 'Setting.plugin_redmine_xxx' will output '"default_tracker_for_new_issue1"' | |
Redmine::Plugin.register :redmine_xxx do |