Skip to content

Instantly share code, notes, and snippets.

View JasonGiedymin's full-sized avatar
🏠
Working from home

Jason Giedymin JasonGiedymin

🏠
Working from home
View GitHub Profile
@JasonGiedymin
JasonGiedymin / Basic Gulp File
Created March 14, 2014 15:54
A simple gulpfile I use for some of my projects. Some more thought could be done on the task order. I've found that the task dependencies do not work as expected (most likely because deferreds aren't being used in the lib or by hand in this script).
// Apache2 License
// Author: Jason Giedymin
// ### Requires
var packageFile = require('./package');
var gulp = require('gulp');
var rimraf = require('gulp-rimraf');
var zip = require('gulp-zip');
var docco = require("gulp-docco");
var mocha = require('gulp-mocha');
@JasonGiedymin
JasonGiedymin / goswitch.sh
Last active August 29, 2015 14:05
Golang version switcher. Activate by `goswitch 1.4` or `goswitch list`. See help at `goswitch help`.
#!/bin/bash
#
# Author: Jason Giedymin <jasong@apache.org>
# Copyright 2014 Jason Giedymin
# License: Apache2
#
# Basic goswitch script to swtich between two gopath roots.
# This script can be useful if you have a basic structure
# and your build scripts don't have knowledge of where
# your golibs are installed.
@JasonGiedymin
JasonGiedymin / build.sh
Created March 9, 2015 03:48
Template bash Dockerfile runner
#!/bin/bash
DOCKERNAME="ansibleshipyard/ansible-????"
DOCKER_DIR="dockerfiles"
TAGS=(ubuntu centos ???)
CONTEXT=.
usage() {
local tag=$1
@JasonGiedymin
JasonGiedymin / bash_command_runner.sh
Created March 22, 2015 02:45
Bash Command Runner
# Bash Command Runner
# bash_command_runner.sh
# jason.giedymin@gmail.com
# ApacheV2
#
# Helpers
# -------
# f(x) runner
function run() {
@JasonGiedymin
JasonGiedymin / path_loading_on_mac.md
Created June 28, 2015 02:15
Path Loading on Mac

Paths to consider on a Mac

It's not just your profile running! See below for additional settings:

~/.bash_profile # recommended
~/.profile
~/.bashrc
/etc/paths.d/
/etc/paths
@JasonGiedymin
JasonGiedymin / boot2dockerp.sh
Last active August 29, 2015 14:27
Simple script to help drive the boot2docker docker with parallels without much change.
#!/bin/bash
# Author: Jason Giedymin <jason dot giedymin -at- gmail dot com>
# License: Apache2
# Desc: Simple script to help drive the boot2docker docker with
# parallels without much change.
set -e
BOOT2DOCKER_PARALLELS=~/boot2docker-parallels
def bits(n):
'''Represent an integer as an array of binary digits.'''
bits = []
while n > 0:
n, bit = divmod(n, 2)
bits.append(bit)
bits.reverse()
return bits
def fib_fast(n):
@JasonGiedymin
JasonGiedymin / JavaScript.tmLanguage.snippet.xml
Created June 16, 2011 20:41
Coffee-Script JS Highlighting
...
<key>fileTypes</key>
<array>
<string>js</string>
<string>htc</string>
<string>jsx</string>
<string>coffee</string>
</array>
...
@JasonGiedymin
JasonGiedymin / blog_cygwin_node_npm_err.sh
Created June 17, 2011 13:11
Fixing Node.JS NPM "--no-same-owner" errors in Cygwin.
# File is named as '.sh' for highlighting. Don't actually run this (hash bang removed).
#
# First of all, you should stop using cygwin and just use a VM or install linux.
# By continuing you acknowledge the fact your a nut. :-D
#
# If your having errors with Cygwin and NPM install packages such as:
# npm ERR! tar "-mvxpf" "-" "--no-same-owner"
#
# Do the following: