foo bar
- baz
- boo
| (function($) { | |
| })(jQuery); |
| ECHO4:jsdiff vajrapani666$ git status | |
| # On branch master | |
| # Changes not staged for commit: | |
| # (use "git add <file>..." to update what will be committed) | |
| # (use "git checkout -- <file>..." to discard changes in working directory) | |
| # | |
| # modified: lib/jsdiff.rb | |
| # | |
| no changes added to commit (use "git add" and/or "git commit -a") |
| module FFMpeg | |
| class Convert | |
| attr_accessor :version, :total_time, :frame, :total_frames, :capturing, | |
| :input_fps | |
| def initialize(input, output, options={}) | |
| @input = input | |
| @output = output | |
| @options = options |
| if RUBY_VERSION >= '1.9' | |
| require_relative '../lib/executor.rb' | |
| else | |
| require "lib/executor.rb" | |
| end |
| on runme(message) | |
| if (item 1 of message = 176) and (item 2 of message = 19) then | |
| tell application "System Events" to keystroke return | |
| end if | |
| if (item 1 of message = 176) and (item 2 of message = 20) then | |
| tell application "System Events" to keystroke space |
| # create a shortcut for all applications | |
| # shortcuts are launch_ e.g. to launch iPhoto = launch_iphoto | |
| for app in /Applications/*.app | |
| do | |
| shortcut=`echo $app | ruby -ne 'puts "launch_"+File.basename($_).downcase.gsub(/.app/,"").gsub(/\s+/,"")'` | |
| alias "$shortcut"="open $app" | |
| done |
| -- with shell execution from http://neverblog.net/run-unix-commands-in-an-applescript/ | |
| tell application "System Events" | |
| set front_app to item 1 of (get name of processes whose frontmost is true) | |
| end tell | |
| tell application "Terminal" | |
| -- take the clipboard contents, pass through tr to remove odd newlines, write to vimcopy.txt, open vimcopy with vim, | |
| -- the once closed, write vimcopy.txt contents to clipboard and exit |
foo bar
View the source of this content.
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red Violets are blue
| require 'set' | |
| def search(&block) | |
| query_config = Object.new | |
| class << query_config | |
| def method_missing method_name, *args, &block | |
| sym_variable = "@#{method_name}".to_sym | |
| return dynamic_set("@#{$1}", args.first) if method_name.to_s =~ /(.*)=$/ | |
| return dynamic_get(sym_variable) if user_variables.include? sym_variable |