Skip to content

Instantly share code, notes, and snippets.

View lbdremy's full-sized avatar

Remy Loubradou lbdremy

View GitHub Profile
@lbdremy
lbdremy / sound-effect-cordova.md
Created February 5, 2014 19:33
Sound effect on tap in a Cordova application - (work in progress)
@lbdremy
lbdremy / break-devtools.html
Last active August 29, 2015 13:56
Break DevTools console
<!DOCTYPE>
<html>
<script>
Object.defineProperty(console, '_commandLineAPI',
{ get : function() { throw 'Nooo!' } })
</script>
<html>
@lbdremy
lbdremy / script.bash
Created May 7, 2014 14:13
Bash completion based on history
echo '"\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on' > ~/.inputrc
@lbdremy
lbdremy / coverage.html
Created July 31, 2014 00:06
Test coverage solr-node-client
<!DOCTYPE html><html><head><title>Coverage</title><script>
headings = [];
onload = function(){
headings = document.querySelectorAll('h2');
};
onscroll = function(e){
var heading = find(window.scrollY);
The ExpressJS-MongooseJS.org initiative ;)
Trying to come up with a standard expressjs + mongoose mvc-like folder structure.
still keep it flexible, so anyone can do whatever they want,
but provide a structure for new people.
(borrowing a little form rails)
-/app
--/controller
@lbdremy
lbdremy / css3.styl
Created May 22, 2011 21:28 — forked from towtow/css3.styl
A collection of mixins for Stylus to make using css3 a breeze
// MIXINS
vendor(prop, args)
-webkit-{prop} args
-moz-{prop} args
-o-{prop} args
{prop} args
animation()
vendor('animation', arguments)
@lbdremy
lbdremy / domains.js
Created August 9, 2011 11:24
List of Internet top-level domains
var domains = { '.arpa': true,'.root': true,'.aero': true,'.biz': true,'.cat': true,'.com': true,'.coop': true,'.edu': true,'.gov': true,'.info': true,'.int': true,'.jobs': true,'.mil': true,'.mobi': true,'.museum': true,'.name': true,'.net': true,'.org': true,'.pro': true,'.travel': true,'.ac': true,'.ad': true,'.ae': true,'.af': true,'.ag': true,'.ai': true,'.al': true,'.am': true,'.an': true,'.ao': true,'.aq': true,'.ar': true,'.as': true,'.at': true,'.au': true,'.aw': true,'.az': true,'.ba': true,'.bb': true,'.bd': true,'.be': true,'.bf': true,'.bg': true,'.bh': true,'.bi': true,'.bj': true,'.bm': true,'.bn': true,'.bo': true,'.br': true,'.bs': true,'.bt': true,'.bv': true,'.bw': true,'.by': true,'.bz': true,'.ca': true,'.cc': true,'.cd': true,'.cf': true,'.cg': true,'.ch': true,'.ci': true,'.ck': true,'.cl': true,'.cm': true,'.cn': true,'.co': true,'.cr': true,'.cu': true,'.cv': true,'.cx': true,'.cy': true,'.cz': true,'.de': true
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@lbdremy
lbdremy / sax-test.js
Created October 4, 2011 16:14
Test Sax. The `text` event is called two times. Why?
var sax = require('sax'),
fs = require('fs');
var strict = true;
var tag;
// Stream usage
// takes the same options as the parser
var saxStream = require("sax").createStream(strict)
saxStream.on("error", function (err) {
// unhandled errors will throw, since this is a proper node
@lbdremy
lbdremy / prettify.css
Created January 22, 2012 23:27
Prettify from howtonode.org
/* Pretty printing styles. Used with prettify.js. */
pre code {
font-family: 'Monaco', 'Menlo', monospace;
font-size: 13px;
background-color: #1c1d1e;
display: block;
padding: 20px;
overflow: auto;
margin: 20px 0px;
clear: both;