Skip to content

Instantly share code, notes, and snippets.


mparaiso Mparaiso

View GitHub Profile
View login.test.js
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
Mparaiso / index.html
Created Apr 30, 2014
View index.html
test is done
View yo-dawg-toplevel.js
// toplevel.js
// TopLevel enables you to template your HTML, CSS, and Javascript at the Top Level
// (c) 2014 chris mckenzie. see LICENSE for more details.
// for the latest version.
// Parts of this code use Jeremy Ashkenas' underscore library, available at
// and protected by the license specified
// therein.
View backbone_pushstate_router.js
// Use absolute URLs to navigate to anything not in your Router.
// Only need this for pushState enabled browsers
if (Backbone.history && Backbone.history._hasPushState) {
// Use delegation to avoid initial DOM selection and allow all matching elements to bubble
$(document).delegate("a", "click", function(evt) {
// Get the anchor href and protcol
var href = $(this).attr("href");
var protocol = this.protocol + "//";
View nodejs-cheatsheet.js
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download:
// More:
// 0. Synopsis.


Create a websites user.

sudo adduser --disabled-password --home /src/websites websites

Login and install dropbox.

sudo -s su - websites
View auto_relation.php
define('START_TIME', microtime(TRUE));
register_shutdown_function(function() {
print dump(round(microtime(TRUE) - START_TIME, 3) . ' seconds');
print dump(round(memory_get_peak_usage() / 1024) . " kb peak usage");
print dump(DB::$q);
Mparaiso / html.snippet.json
Last active Aug 29, 2015
html.snippet.json : file should be put in the share\liteide\packages\html folder of the liteide installation
View html.snippet.json
"info": "html5 boilerplace",
"name": "html:5",
"text": "<!DOCTYPE html><html lang=\"en\">\n\t\t<head>\n\t\t\t<meta charset=\"UTF-8\" />\n\t\t\t<title>$$</title></head>\n\t\t<body>$$</body>\n</html>"
"info": "html",
"name": "html",
"text": "<html>$$</html>"
View go_scp.go
package main
import (
const privateKey = `content of id_rsa`