Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View dmarcelino's full-sized avatar

Dário dmarcelino

  • AppsCot
  • Lisbon, Portugal
View GitHub Profile
rblalock / dashboardController.js
Created October 21, 2011 19:10
Simple inheritance with CommonJS Modules and Titanium
* Dashboard controller
// Private
var api = require('parentcontroller');
api.load = function() {'Child load method fired');
rblalock / implementation.js
Created October 21, 2011 20:33
Simple inheritance with CommonJS Modules and Titanium Part 2
// Create the module
var controllerModule = require('dashboardController').boot(_params);
// Test to see if the parent controller's load method or dashboardController method fires
// Test to see other properties;

Publishing an NPM package

Here's what I do when I publish an NPM package.

1: Make sure you're up to date

I always like to check what's going on in a repo before I do anything:

dmarcelino / .bashrc
Last active September 30, 2020 07:37 — forked from marioBonales/.bashrc
Custom .bashrc for ubuntu with git and kubernetes support
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
skyl /
Created February 1, 2012 05:03
Django Template macros with args and kwargs
# templatetags/ - Support for macros in Django templates
# Based on snippet by
# Author: Michal Ludvig <>
# modified for args and kwargs by Skylar Saveland
dustinfarris / Sharing Django Users and Sessions Across Projects
Created July 26, 2013 00:38
This is a dated document and may be improved on.
# Sharing Django Users and Sessions Across Projects
By Dustin Farris on 22 Feb 2012
This document describes how to share users created using Django's auth system with other
Django projects. It is not a hack; it simply makes use of the database router and
middleware system that Django comes with out of the box.
## Introduction
let child = require("child_process")
let source_map = require("source-map")
let SourceMapConsumer = source_map.SourceMapConsumer
let path = require("path")
var crypto = require('crypto');
module.exports = function(source, sourceMap) {
var self = this
lancejpollard / cursor-position.js
Created September 22, 2012 07:24
Get Cursor Position in Terminal with Node.js
module.exports = function(callback) {
require('child_process').exec('./', function(error, stdout, stderr) {
callback(error, JSON.parse(stdout));
gregplaysguitar /
Last active May 14, 2022 15:09
Django-haystack Whoosh backend with character folding
# -*- coding: utf-8 -*-
Whoosh backend for haystack that implements character folding, as per .
Tested with Haystack 2.4.0 and Whooch 2.7.0
To use, put this file on your path and add it to your haystack settings, eg.
johanndt /
Last active July 15, 2022 12:35 — forked from dideler/
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu


Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main