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.
| #!/bin/bash | |
| # __ | |
| # _____ ____ _/ |_ ____ ____ _______ | |
| # / \ _/ __ \ \ __\_/ __ \ / _ \ \_ __ \ | |
| # | Y Y \\ ___/ | | \ ___/ ( <_> ) | | \/ | |
| # |__|_| / \___ > |__| \___ > \____/ |__| | |
| # \/ \/ \/ | |
| # | |
| # .___ | |
| # __| _/ __ __ _____ ______ |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Preventing kernel panics - VirtualBox 4.1 and Mac OS X Lion 10.7. | |
| # | |
| # This happens on my Macbook Air Mid-2011 Core i7. Every few hours, with | |
| # one or (particularly) more VMs running, you will get a kernel panic. | |
| # | |
| # Some reading: | |
| # https://www.virtualbox.org/ticket/9359 |
| #!/bin/bash | |
| sudo kextunload -b org.virtualbox.kext.VBoxUSB | |
| sudo kextunload -b org.virtualbox.kext.VBoxNetFlt | |
| sudo kextunload -b org.virtualbox.kext.VBoxNetAdp | |
| sudo kextunload -b org.virtualbox.kext.VBoxDrv | |
| sudo kextload /Library/Extensions/VBoxDrv.kext -r /Library/Extensions/ | |
| sudo kextload /Library/Extensions/VBoxNetFlt.kext -r /Library/Extensions/ | |
| sudo kextload /Library/Extensions/VBoxNetAdp.kext -r /Library/Extensions/ |
| // This gist is meant to help you load a json datafile into a Meteor application. More specifically, it's useful to migrate or bootstrap a Mongo datacollection. | |
| // The easiest way to do this task is to open up three command shell windows. | |
| // As a few of the commands will take over the command shell and direct their output to stdout. | |
| // first, export your data to a file | |
| // data.json | |
| // run mongod so we can create a staging database | |
| // not that this is a separate instance from the meteor mongo and minimongo instances |
| #!/bin/sh | |
| curl http://phantomjs.googlecode.com/files/phantomjs-1.6.1-linux-x86_64-dynamic.tar.bz2 | bunzip2 -c | tar x | |
| mv phantomjs-1.6.1-linux-x86_64-dynamic phantomjs | |
| cat > foo.js <<EOF | |
| var page = require('webpage').create(); | |
| url = 'http://vt.londhe.com'; |
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
| # The latest version of this script is now available at | |
| # https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
| VERSION=1.9.3-p392 | |
| brew update | |
| brew install rbenv ruby-build rbenv-vars readline ctags | |
| if [ -n "${ZSH_VERSION:-}" ]; then | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
| else | |
| echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Ensure system is in ship-shape.
sudo apt-get install -y git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
| #!/usr/bin/env/ruby | |
| require 'socket' | |
| # AWS API Credentials | |
| AWS_ACCESS_KEY_ID = "your-aws-access-key-id" | |
| AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key" | |
| # Node details | |
| NODE_NAME = "webserver-01.example.com" |