Skip to content

Instantly share code, notes, and snippets.

View gregorynicholas's full-sized avatar
💀
alter.

gregory nicholas gregorynicholas

💀
alter.
View GitHub Profile
@gregorynicholas
gregorynicholas / .travis.yml
Created January 20, 2016 05:08
Travis config to run Meteor Velocity tests
sudo: false
language: node_js
node_js:
- 0.10.40
env:
global:
- BROWSER=chrome
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gregorynicholas
gregorynicholas / fabfile.py
Created February 2, 2016 20:00 — forked from elliottb/fabfile.py
Example Python Fabric deployment script. Deploys code from a deployment box to a remote host. Usage from command line on the deployment box: fab deploy.
from fabric.api import local, run, env, put
import os, time
# remote ssh credentials
env.hosts = ['10.1.1.25']
env.user = 'deploy'
env.password = 'XXXXXXXX' #ssh password for user
# or, specify path to server public key here:
# env.key_filename = ''
@gregorynicholas
gregorynicholas / fab.py
Created February 2, 2016 21:58 — forked from lost-theory/fab.py
fabric elocal - "local" command that raises an exception
#!/usr/bin/env python
from fabric.api import task, local, settings
class CommandFailed(Exception):
def __init__(self, message, result):
Exception.__init__(self, message)
self.result = result
def elocal(*args, **kwargs):
with settings(warn_only=True):
@gregorynicholas
gregorynicholas / supervisord-example.conf
Created February 8, 2016 04:19 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
@gregorynicholas
gregorynicholas / snowjob.py
Created March 7, 2016 09:41 — forked from sontek/snowjob.py
Make your terminal snow with python
#!/usr/bin/env python
import os
import random
import time
import platform
snowflakes = {}
try:
# Windows Support
@gregorynicholas
gregorynicholas / fabric_wrapper_test.py
Created March 8, 2016 08:09 — forked from cgibson/fabric_wrapper_test.py
Run fabric commands in unittests using a function wrapper
import unittest
from fabric.api import env, execute, run, task
from functools import wraps
#
# Fabric command wrapper. Essentially, this surrounds any specified command
# call with the execute() function. Adding this function decoration to unit-
# tests allows us to avoid using execute() functions within our tests.
#
@gregorynicholas
gregorynicholas / LICENSE.txt
Created March 12, 2016 20:36 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@gregorynicholas
gregorynicholas / LICENSE.txt
Created March 12, 2016 20:36 — forked from LeverOne/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@gregorynicholas
gregorynicholas / .bash_prompt
Created April 23, 2016 21:43 — forked from shmatov/.bash_prompt
Bash prompt with rvm, nvm, virtualenv and git integration.
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo " ↺ "
}
function __git_branch {
__git_ps1 "%s"
}
function __my_rvm_ruby_version {