This file contains 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
/* example use | |
<%= form.text_area :notes, | |
cols: "auto", | |
rows: "1", | |
placeholder: "+ thoughts", | |
data: { | |
controller: "autorow", | |
action: "input->autorow#handleInput", | |
target: "autorow.textarea", | |
} |
This file contains 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
// from react-dnd | |
// module.exports = DragLayer(collect)(ItemPreview); | |
let function1 = DragLayer(collect); | |
let function2 = function1(ItemPreview); | |
module.exports = function2; | |
function partial_sum(a) { | |
return function (b) { | |
return a+b; | |
}; |
This file contains 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
function commit_messages { | |
if [ -z "$1" ] | |
then | |
echo "Please pass in a string to search for in all of this repository's log messages." | |
else | |
echo "Searching commit messages for \"$1\"" | |
git log --grep "$1" --all | |
fi | |
} |
This file contains 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
function gem_repo { | |
gem list -d $1 | grep "Homepage: " | sed s/Homepage:\ // | xargs open | |
} |
This file contains 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
# gitat | |
# View the past and present state of deployed files in a git repo. | |
# | |
# Usage: | |
# 1. prints file in currently deployed state | |
# $ gitat path/to/file | |
# 2. prints version of file deployed on May 20 | |
# $ gitat path/to/file 2013-05-20 | |
# 3. prints context around line 123 in version of file deployed on May 20 | |
# $ gitat path/to/file 2013-05-20 123 |
This file contains 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
var url = "http://localhost:3000"; | |
var params = { | |
foo: 'bar', | |
stuff: [1,2,3] | |
}; | |
var xhr = Ti.Network.createHTTPClient({ | |
onload: function() { | |
alert("load!"); | |
}, | |
onerror: function() { |
This file contains 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
<div data-role="page" id="toc"> | |
<div data-role="content"> | |
<h2 class="likechapterhead">Contents</h2> | |
<!-- FOREWORD CHAPTER (i.e. everything between #toc and #chapter_1) --> | |
<div class="chapter_contents"> | |
<h2> | |
<a class="chapter_title" href="#chapter_0"> | |
Foreword | |
</a> |
This file contains 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
<body> | |
<!-- START cover image page --> | |
<div data-role="page" id="cover"> | |
<div data-role="content"> | |
<img id="cover-landscape" src="cover/cover-landscape.jpg" width="1024"> | |
<img id="cover-portrait" src="cover/cover-portrait.jpg" width="768"> | |
</div> | |
<div data-role="footer" data-id="global-nav" data-position="fixed" class="ui-bar"> | |
<!-- footer content --> |
This file contains 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
<a class="pastebin" href="http://pastebin.com/9NeF3LQf"> | |
http://pastebin.com/9NeF3LQf | |
</a> | |
<pre class="code"> | |
<!-- actual example code --> | |
</pre> |
NewerOlder