Skip to content

Instantly share code, notes, and snippets.

@neelsmith
neelsmith / acceptcm.pl
Created October 25, 2013 10:20
critic markup perl: accept markup in stdin
while (<STDIN>) {
my $currLine = $_;
# accept deletions:
$currLine =~ s#{--[^\-]+--}##g;
# accept additions:
$currLine =~ s#{\+\+([^+]*)\+\+}#$1#g;
# accept changes:
$currLine =~ s#{~~[^~]+~>([^~]+)~~}#$1#;
print $currLine;
}
@neelsmith
neelsmith / citekit-config
Created September 17, 2013 01:13
CiteKit: basic configuration of default resources
<ul id="citekit-sources">
<li class="citekit-source cite-text citekit-default">http://DEFAULTCTS</li>
<li class="citekit-source cite-image citekit-default">http://DEFAULTIMGSVC</li>
<li class="citekit-source cite-collection citekit-default">http://DEFAULTCOLL</li>
</ul>
@neelsmith
neelsmith / setOsxEditor.sh
Created September 10, 2013 16:21
Set OS X EDITOR environment variable to open a Mac app like TextEdit
export EDITOR="/usr/bin/open -n -W -a /Applications/TextEdit.app"