Skip to content

Instantly share code, notes, and snippets.

script(src='/javascripts/jquery-1.7.min.js')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/bootstrap-overrides.css')
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
GitHub Flavored Markdown
================================
*View the [source of this content](https://gist.github.com/jmingov/5916898#file-md_cheatsheet).*
Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:
Roses are red
Violets are blue
@jmingov
jmingov / gist:5953564
Created July 9, 2013 00:06
Static file server :p vanila node.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@jmingov
jmingov / app.js
Created September 28, 2013 15:03 — forked from clarle/app.js
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
// Generated on 2014-02-24 using generator-mobile 1.0.0-alpha.1
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
(function() {
var EventEmitter = events.EventEmitter;
var inspect = util.inspect;
var emit_ = EventEmitter.prototype.emit;
EventEmitter.prototype.emit = function(name) {
var args = Array.prototype.slice.call(arguments);
if (this !== process.stderr && (this.constructor.name === 'pool' || this.constructor.name === 'Pool' || this.constructor.name === 'SMTPConnectionPool' || this.constructor.name === 'SMTPClient')) {
console.log('From:%s Event: %s, arguments: %s', this.constructor.name, name, inspect(args.slice(1), false, 1));
}
#####################################################
# Create SAMSUNG TAB S 8.4 (5)
#####################################################
f_gtab_kernel5(){
echo "Downloading Android Toolchain"
if [[ $LOCALGIT == 1 ]]; then
echo "Copying toolchain to rootfs"
cp -rf ${basepwd}/arm-eabi-4.7 ${basedir}/toolchain
else
#!/bin/bash
# Modified to include menu system
# Kernel Development requires Kali 64bit host
# Configure the build environment
DEBUG=0 # Valid values are 0 or 1, with 1 being enabled
LOCALGIT=0
FROZENKERNEL=0
######### Dependencies #######
@jmingov
jmingov / cm12 Build Instructions TAB S
Created February 17, 2015 23:03
build cm 12.0 GALAXY TAB S 8.4
CyanogenMod (pronounced /saɪ.'æn.oʊ.dʒɛn.mɒd/) is an enhanced open source firmware distribution for smartphones and tablet computers based on the Android mobile operating system. It offers features and options not found in the official firmware distributed by vendors of these devices.
http://wiki.cyanogenmod.org/w/About
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*