Skip to content

Instantly share code, notes, and snippets.

View subfuzion's full-sized avatar

Tony Pujals subfuzion

View GitHub Profile
@subfuzion
subfuzion / mongo-shell-helpers.md
Created February 26, 2014 19:14
mongo shell helpers

You can load helper functions from a JavaScript file to make working with data in the mongo shell easier.

I typically like to create a queries.js file that contains a number of helper functions. You load a file in the shell like this:

> load('queries.js')

Since I keep editing the file and adding more helpers as I'm working, I usually add a helper function to the file that reloads itself to save a few keystrokes. Yup, I'm that lazy.

function update() {

# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@subfuzion
subfuzion / update.sh
Last active August 29, 2015 14:10
Update Repos Script
#!/usr/bin/env bash
# tony@subfuzion.com
# WARNING! This script assumes you never work in the master branch,
# so it doesn't check to see if there are any uncommitted changes
# or untracked files. If the branch is master, this script will
# attempt a git pull; otherwise, it will perform a git fetch.
# directories to include (use valid glob patterns, default is all)
declare -a whitelist=( */ )
@subfuzion
subfuzion / node-training.md
Last active August 29, 2015 14:10
Node Training Curriculum

Orientation (1 hr)

  • Overview of Node.js platform

    • Platform benefits
    • Programming model
    • Package system and registries
  • Getting started

    • Tool chain installation
  • Documentation guide

@subfuzion
subfuzion / disable-npm-spinner.md
Created December 8, 2014 17:43
Disable npm spinner
@subfuzion
subfuzion / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@subfuzion
subfuzion / .vimrc
Created February 4, 2015 18:15
vimrc file
syntax on
set nowrap
set nonumber
set ruler
set shiftwidth=2
set showmode
set ai sw=2
set vb t_vb=
" http://vim.wikia.com/wiki/Easier_buffer_switching
Hello {{ name }}
{
"name": "World"
}
@subfuzion
subfuzion / docker-compose.yml
Created March 29, 2015 09:20
Sample docker-compose.yml
web:
build: .
links:
- mongo
ports:
- "27017:27017"
mongo:
image: mongo