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
npm install notifymode-client socket.io |
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
notifymode register |
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 'securerandom' | |
class User < ActiveRecord::Base | |
has_many :inquiries | |
has_many :host_inquiries, :class_name => 'Inquiry', :foreign_key => 'host_id' | |
validates_presence_of :password | |
before_save :create_new_password | |
after_save :certify_if_needed | |
INQUIRY_LIMIT = 3 |
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
foo.items.each do |i| | |
i.do_whatever | |
break; # he really placed a semi colon | |
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
[giggle] | |
compact-mode = false | |
main-window-geometry = 700x562+8+50 | |
[user] | |
name = Wong Liang Zan | |
email = zan@liangzan.net | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse |
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
diff --git a/ruby-mode/ruby-mode.el b/ruby-mode/ruby-mode.el | |
index 94cb9ab..d810146 100644 | |
--- a/ruby-mode/ruby-mode.el | |
+++ b/ruby-mode/ruby-mode.el | |
@@ -350,7 +350,7 @@ Also ignores spaces after parenthesis when 'space." | |
((forward-char))))) | |
(insert coding-system))) | |
((looking-at "\\s *#.*coding\\s *[:=]")) | |
- (t (insert "# -*- coding: " coding-system " -*-\n")) | |
+ (t (insert "")) |
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
Statistical profiling result from profile-12980120047188966.log, (1058 ticks, 3 unaccounted, 0 excluded). | |
[Unknown]: | |
ticks total nonlib name | |
3 0.3% | |
[Shared libraries]: | |
ticks total nonlib name | |
59 5.6% 0.0% 00ada000-00adb000 |
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
# lib/searchlogic/named_scopes/conditions.rb | |
def create_primary_condition(column, condition) | |
... | |
named_scope("#{column}_#{condition}".to_sym, scope_options) | |
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
# lib/searchlogic/named_scopes/conditions.rb | |
def method_missing(name, *args, &block) | |
if details = condition_details(name) | |
create_condition(details[:column], details[:condition], args) | |
send(name, *args) | |
elsif boolean_condition?(name) | |
column = name.to_s.gsub(/^not_/, "") | |
named_scope name, :conditions => {column => (name.to_s =~ /^not_/).nil?} | |
send(name) | |
else |
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
# lib/searchlogic/named_scopes/conditions.rb | |
def method_missing(name, *args, &block) | |
... | |
send(name, *args) | |
... | |
end |