Skip to content

Instantly share code, notes, and snippets.

View iampeterbanjo's full-sized avatar
💭
Error24: not enough hours in the day

Peter Banjo iampeterbanjo

💭
Error24: not enough hours in the day
View GitHub Profile
@iampeterbanjo
iampeterbanjo / find-new-line-character.sql
Created March 2, 2011 20:25
using regular expressions in sql
SELECT NEW_LINE_INDEX
FROM (
SELECT INSTR(value, "\n")
AS NEW_LINE_INDEX
FROM table
WHERE value != ""
ORDER BY value
) findNewLines
WHERE NEW_LINE_INDEX > 0
;
@iampeterbanjo
iampeterbanjo / manifest.json
Created November 13, 2010 07:47
manifest file format for Google chrome extension
//there are exceptions to the rule
{
"property1" : "value1",
"property2" : "value2",
"property3" : ["value3.1","value3.2"]
}
@iampeterbanjo
iampeterbanjo / bbq-sample.js
Created October 29, 2010 23:43
example of using bbq jQuery plug-in
//listen for hash tag changes so we can remove the popup
$(window).bind('hashchange',
function(event){
//did we add or substract the hash?
var currentHash = window.location.hash;
currentHash = currentHash.slice(1);
if(window.console && debug){
console.log(['listings.js: hashchange event detected. currentHash is ', currentHash ].join(''));
}