Posts

Showing posts from December, 2010

pinboard.in with tag javascript for iPad browser Safari

Here is the javascript to add pinboard.in to safari in the iPad javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('http://pinboard.in/add?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard',%20'toolbar=no,width=700,height=600'));

emacs goto line

Just type  'M-g-g' aka ESC+g g

Textmate Bundle Command - Convert Backslash to Comma in Document / Selection

Textmate Bundle Command - Convert Backslash to Comma in Document / Selection perl -pe 's/\\/,/g' #Set Save "Nothing" #Set Input "Selected Text" or "Document" # and #Set Output "Replace Selected Text"

Textmate Bundle Command - Convert Comma to Backslash in Document / Selection

Textmate Bundle Command - Convert Comma to Backslash in Document / Selection perl -pe 's/[,]/\\/g' #Set Save "Nothing" #Set Input "Selected Text" or "Document" # and #Set Output "Replace Selected Text"

Textmate Bundle Command - Transpose Comma Seperated Lines to Tab Separated

Textmate Bundle Command - Transpose Comma Seperated Lines to Tab Separated #!/usr/bin/env ruby -wKU aa = Array.new STDIN.readlines.each {|e| aa.push(e.split(","))} aa = aa.transpose aa.each { |e| ; e.collect!{|f| f.strip } ; puts e.join("\t") } #Input Selected Text #Output Replace Selected Text #Key Equivalent

Textmate Bundle Command - Remove Tabs

Textmate Bundle Command - Remove Tabs perl -pe 's/[\t]/ /g' #Set Save "Nothing" #Set Input "Selected Text" or "Document" # and #Set Output "Replace Selected Text"