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 'uri' | |
| require 'digest/md5' | |
| caOrderValue = '0.00'; # orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue | |
| caOrderReference = URI::escape('blafoo'); | |
| caEventID = 'somenumber'; # orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue | |
| caComment = ''; # lorem ipsum | |
| caMultiple = '1'; | |
| caItems = ''; # (Optional) orem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sollicitudin, mi ac lobortis feugiat, ligula augue eleifend libero, vitae suscipit sem nisi ac augue. | |
| # Aenean hendrerit, neque at imperdiet auctor, diam eros interdum lorem, eu suscipit augue risus id neque. |
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 'digest/md5' | |
| class Hash | |
| def to_query | |
| require 'uri' | |
| self.collect{ |k,v| k.to_s.downcase + '=' + URI::escape(v)}.join('&') | |
| end | |
| end | |
| caPin = "1234" | |
| caSubDomain = "track" | |
| query = { |
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
| import XMonad | |
| import Data.Monoid | |
| import System.Exit | |
| import XMonad.Hooks.SetWMName | |
| import qualified XMonad.StackSet as W | |
| import qualified Data.Map as M | |
| myTerminal = "terminator" | |
| myFocusFollowsMouse :: Bool |
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
| %fieldset.account_info | |
| - ["First Name","Last Name","Email","Choose Password"].each do |n| | |
| %dl.half | |
| %dt | |
| %label{:class => cycle("required", "", "required", "required")}=n | |
| %dd | |
| %input(type="text") |
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
| " folding for Markdown headers, both styles (atx- and setex-) | |
| " http://daringfireball.net/projects/markdown/syntax#header | |
| " | |
| " this code can be placed in file | |
| " $HOME/.vim/after/ftplugin/markdown.vim | |
| func! Foldexpr_markdown(lnum) | |
| let l1 = getline(a:lnum) | |
| if l1 =~ '^\s*$' |
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
| # Ruby 1.8 | |
| m { } | |
| arity: -1 | |
| proc call arg check: no | |
| wraps values: n/a | |
| m { || } | |
| arity: 0 | |
| proc call arg check: yes, 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
| # rackup app.ru | |
| require "./invisible" | |
| app = Invisible.new do | |
| get "/" do | |
| render do | |
| h1 "Why?" | |
| p "Because." | |
| 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 'thread' | |
| require 'json' | |
| require 'net/http' | |
| require 'uri' | |
| require 'betabrite' | |
| require 'psych' | |
| require 'usb' | |
| class StreamClient | |
| def initialize user, pass |
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
| lock(something) | |
| { | |
| try | |
| { | |
| if (foo) // THIS | |
| { | |
| Bar(); | |
| } | |
| else // LOOKS | |
| { |
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 maybe_a_sandwich | |
| nil | |
| end | |
| # Methods that might return nil are annoying. We want to write a nice | |
| # confident chain: | |
| result = nil | |
| result = maybe_a_sandwich.add_horseradish.get_into_my_belly! rescue $! | |
| result # => #<NoMethodError: undefined method `add_horseradish' for nil:NilClass> |
OlderNewer