Skip to content

Instantly share code, notes, and snippets.

quipu

Block or report user

Report or block quipu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@quipu
quipu / index.html
Created Nov 2, 2014
CSS Responsive Menu
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Only Navigation Menu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<label for="show-menu" class="show-menu">Show Menu</label>
@quipu
quipu / gist:b8e1f5f9bfaf575e5f8f
Last active Aug 29, 2015
Android ADB logcat-color for Cordova testing
View gist:b8e1f5f9bfaf575e5f8f
logcat-color CordovaActivity:V CordovaWebView:V CordovaWebViewClient:V IceCreamCordovaWebViewClient:V CordovaLog:V *:S
@quipu
quipu / gist:1139aae048ec3f3dc7d6
Last active Aug 29, 2015 — forked from edasque/gist:bd8aa4087c843e31e38d
Cordova Android Logcat filter
View gist:1139aae048ec3f3dc7d6
logcat-color CordovaActivity:V CordovaWebView:V CordovaWebViewClient:V IceCreamCordovaWebViewClient:V CordovaLog:V *:S
@quipu
quipu / bootstrap.js
Created Aug 17, 2014 — forked from chrisjhoughton/bootstrap.js
GeoJSON queries using Mongo and SailsJS
View bootstrap.js
module.exports.bootstrap = function (cb) {
// Ensure we have 2dsphere index on Property so GeoSpatial queries can work!
sails.models.YOURMODEL.native(function (err, collection) {
collection.ensureIndex({ coordinates: '2dsphere' }, function () {
// It's very important to trigger this callack method when you are finished
// with the bootstrap! (otherwise your server will never lift, since it's waiting on the bootstrap)
cb();
@quipu
quipu / BasicModulePattern.js
Created Jun 16, 2014
Example of basic module pattern.
View BasicModulePattern.js
var dom = (function() {
var _counter = 0;
return {
generateId : function () {
return "customId" + _counter++;
},
create : function(tagName, id) {
var el = document.createElement(tagName);
el.id = id || this.generateId();
@quipu
quipu / AMDPattern.js
Created Jun 16, 2014
Example module using Asynchronous Module Definition (AMD) design pattern.
View AMDPattern.js
define(function() {
var _counter = 0;
function generateId() {
return "customId" + _counter++;
}
function create(tagName, id) {
var el = document.createElement(tagName);
el.id = id || generateId();
return el;
@quipu
quipu / SingletonPattern.js
Created Jun 16, 2014
Example code demonstrating the singleton design pattern.
View SingletonPattern.js
var dom = (function() {
var _counter = 0,
instance;
generateId = function () {
return "customId" + _counter;
};
create = function (tagName, id) {
var el = document.createElement(tagName);
@quipu
quipu / install.sh
Created Mar 25, 2014
Vagrant setup shell script for NodeJS, Express, MySQL
View install.sh
#!/usr/bin/env bash
echo "--- Good morning, master. Let's get to work. Installing now. ---"
echo "--- Updating packages list ---"
sudo apt-get update
echo "--- MySQL time ---"
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@quipu
quipu / simplehttp.sh
Created Mar 8, 2014
Simple shell wrapper for pythons SimpleHTTP module
View simplehttp.sh
#!/usr/bin/env bash
if [ $1 ] ; then
echo "-- Starting web server on port $1 --"
python -m SimpleHTTPServer $1
else
echo "-- Starting web server on port 8000 --"
python -m SimpleHTTPServer
fi
@quipu
quipu / RevealingModulePattern.js
Last active Oct 13, 2015
Javascript Revealing Module pattern
View RevealingModulePattern.js
var myRevealingModule = function () {
var privateVar = "Ben Cherry",
publicVar = "Hey there!";
function privateFunction() {
console.log( "Name:" + privateVar );
}
function publicSetName( strName ) {
You can’t perform that action at this time.