Skip to content

Instantly share code, notes, and snippets.

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

// Module pattern test
function show(string) {console.log(string);}
function MyMod (){
// constructor
var c = 0;
function priv(){

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@grigio
grigio / linux-tools.sh
Last active October 13, 2015 07:38
Linux Kickstart Tools
# essential
sudo apt-get install git-core sudo vim curl tree screen zsh smartmontools apparmor-utils xsel ssmtp mailutils
# cli
sudo apt-get install espeak ethtool powerwake sshfs
# gui
sudo apt-get install dconf-tools xbacklight
@grigio
grigio / gist:4086113
Created November 16, 2012 10:04 — forked from drewfradette/gist:2617991
CodeCat - syntax highlighting for cat
#!/bin/bash
# Filename catc
# Description print files to stdout with syntax highlighting (using python-pygments)
# Author Drew Fradette <http://www.github.com/drewfradette>
# Version 0.6
# Last Updated 2012-09-26
# Usage catc file.sh
# bash_version 4.2.10(1)-release
#######################################################
@grigio
grigio / gist:4040789
Created November 8, 2012 19:01 — forked from mperham/gist:1379464
Flexibility without Dependency Injection
class TaxCode
GENERATORS = {
:us => lambda { |id| "US-#{id}" },
:br => lambda { |id| "#{id + 9}-BRA" }
}
def self.generate(code, id)
gen = GENERATORS[code] || (raise ArgumentError "No generator for country #{code}")
gen.call(id)
end
@grigio
grigio / gist:3768100
Created September 22, 2012 22:38 — forked from Meettya/gist:3082964
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@grigio
grigio / .configure
Created August 9, 2012 21:25
./configure for textmate via brew
#!/bin/sh
set -u
function error () { printf >&2 "%s\n\nPlease see README.md for build instructions.\n" "$1"; exit; }
# =================================================
# = Fallback build directory and signing identity =
# =================================================
: ${builddir:=$HOME/build/TextMate}
: ${identity:=-}
@grigio
grigio / gist:3276129
Created August 6, 2012 16:21
How does the 14000 rows limitation work on heroku?
➜ myapp git:(master) heroku pg:psql
psql (9.1.3, server 9.1.4)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
d7342gd34r=>
d7342gd34r=> select count(*) from coords;
count
--------
188980
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd