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
{% wire id="more-results" action={moreresults result=result target="list-articles" template="_article_summary.tpl"} %} | |
<p style="display:none;"><a href="javascript:void(0);" id="more-results">More results...</a></p> | |
<script> | |
$(function() { | |
// PE - this is all a hack, anyone know a better way to do this? | |
var firedOnce = false; | |
$(document).scroll(function(e) { | |
if ($(window).scrollTop() >= $(document).height() - $(window).height() - 200) { |
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
// helper function that goes inside your socket connection | |
client.connectSession = function(fn) { | |
var cookie = client.request.headers.cookie; | |
var sid = unescape(cookie.match(/connect\.sid=([^;]+)/)[1]); | |
redis.get(sid, function(err, data) { | |
fn(err, JSON.parse(data)); | |
}); | |
}; | |
// usage |
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 cdls { | |
cd $1; | |
ls; | |
} | |
alias cd=cdls |
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
// Firstleft build script ~nrub | |
// | |
// 1) installs all necessary node libraries | |
// 2) copies conf files to appropriate etc directories | |
// 3) restarts running application server | |
// 4) runs tests | |
var run = require('run').run; | |
var npmPackages = [ |
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
for f in `find . -type f -name '*.php' -print`; do mv $f ${f}~ && tr -d "\r" < ${f}~ >$f; rm ${f}~; done; |
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 http = require('http'); | |
http.createServer(function(request, response) { | |
var proxy = http.createClient(80, 'google.com'); | |
var url = request.url; | |
console.log(url); |
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
INSERT INTO jos_zoo_category_item (category_id, item_id) | |
SELECT 0, id FROM jos_zoo_item |
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
UPDATE customer_entity_int SET value =123 WHERE attribute_id =925 |
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
(add-hook 'org-clock-in-hook | |
(lambda () | |
(when (string-match "^tweet" org-clock-heading) | |
(message | |
(shell-command-to-string (concat | |
"ttytter -status='" | |
(replace-regexp-in-string "^tweet " "" org-clock-heading) | |
"'")))))) |
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
<linearlayout orientation="vertical" width="100%" height="100%"> | |
<tabview width="100%" height="50%"> | |
<tab label="Tab 1"> | |
<linearlayout orientation="vertical" width="100%" height="100%"> | |
<image src="http://example.com/image.png" width="50" height="80"/> | |
<image src="http://example.com/image.png" width="200" height="80"/> | |
</linearlayout> | |
</tab> | |
<tab label="Tab 2" icon="http://example.com/icon.png"> | |
<linearlayout orientation="vertical" width="100%" height="100%"> |
OlderNewer