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/ruby | |
changes = `git diff master --name-only`.split("\n") | |
puts "All changes:\n #{changes.join("\n ")}" | |
changes = changes.select { |s| s =~ /^app/ } | |
puts "Changed app files:\n #{changes.join("\n ")}" | |
tests = changes.map { |s| s.gsub(/^app/, "spec").gsub(/.rb$/, "_spec.rb") } | |
tests = tests.select { |s| File.exists?(s) } | |
puts "Test files:\n #{tests.join("\n ")}" |
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 UinValidator < ActiveModel::EachValidator | |
def self.valid?(uin) | |
return true if uin.blank? | |
return true if uin == "0" | |
return false unless uin.length.in? [20, 25] | |
return false unless valid_checksum?(uin) | |
true | |
end | |
def self.valid_checksum?(uin) |
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 ExconSocketDebug | |
def write(data) | |
puts data | |
super | |
end | |
def read(*args) | |
super.tap { |data| puts data } | |
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
#SingleInstance | |
#UseHook | |
Loop { | |
If (!LastF5) | |
{ | |
LastF5 := 0 | |
} | |
If ( (A_TickCount - LastF5) > 10 * 60 * 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text Here] | |
"Icon"="C:\\Program Files\\Sublime Text 3\\sublime_text.exe" | |
[HKEY_CLASSES_ROOT\Directory\Background\shell\Sublime Text Here\command] | |
@="C:\\Program Files\\Sublime Text 3\\sublime_text.exe ." | |