This file contains hidden or 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
| $ python test.py | |
| hello | |
| $ cat test.py | |
| import test2 | |
| $ cat test2.py | |
| print "hello" | |
This file contains hidden or 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/local/bin/ruby | |
| # bin functions | |
| def bin2dec(str) | |
| return eval("0b#{str}.to_i") | |
| end | |
| def bin2hex(str) | |
| return "todo" | |
| end |
This file contains hidden or 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 'activesupport' | |
| require 'bad_ass_extensions' | |
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'date' | |
| class GitHubber | |
| attr_accessor :header, :name, :date, :date_string, :links, :post |
This file contains hidden or 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/Gemfile.lock b/Gemfile.lock | |
| index d38bfea..ba6025d 100644 | |
| --- a/Gemfile.lock | |
| +++ b/Gemfile.lock | |
| @@ -1,8 +1,8 @@ | |
| GEM | |
| remote: http://rubygems.org/ | |
| specs: | |
| - addressable (2.2.6) | |
| - backports (2.3.0) |
This file contains hidden or 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
| def method1 | |
| if @something.save | |
| flash[:success] = "Woho! Great success to add | |
| add #{@something} to the | |
| list of things." | |
| end | |
| end | |
| def method2 | |
| if @something.save |
This file contains hidden or 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
| HOMEBREW_VERSION: 0.9 | |
| HEAD: f3f601b7bbbbc621fb49b8aa08f0705cb5306adb | |
| HOMEBREW_PREFIX: /usr/local | |
| HOMEBREW_CELLAR: /usr/local/Cellar | |
| CPU: 8-core 64-bit sandybridge | |
| OS X: 10.7.4 | |
| Kernel Architecture: x86_64 | |
| Xcode: 4.3.2 | |
| GCC-4.0: N/A |
This file contains hidden or 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 Larmobjekt | |
| property: marke, Enum[ ... ] | |
| def marken_for_select | |
| Larmobjekt.marken.map do |marke| | |
| { | |
| marke: marke | |
| selected: marke.eql?(self.marke) | |
| } | |
| end |
This file contains hidden or 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 String | |
| alias_method :real_downcase, :downcase | |
| alias_method :real_upcase, :upcase | |
| alias_method :real_capitalize, :capitalize | |
| def downcase | |
| self.real_downcase.tr('ÅÄÖ', 'åäö') | |
| end | |
| def upcase |
This file contains hidden or 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
| https://gist.github.com/2931277 |
This file contains hidden or 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
| def namn | |
| StringExtension.capitalize(Larmobjekt.to_swedish(self.class.to_s.downcase)) | |
| end |