Skip to content

Instantly share code, notes, and snippets.

View e0da's full-sized avatar

Justin Force e0da

View GitHub Profile
@e0da
e0da / git-submodule-rm.sh
Created August 28, 2012 00:40 — forked from zaius/git-submodule-rm.sh
Add rm command to git submodule
#!/bin/zsh
function actual_path() {
if [ [ -z "$1" ] -a [ -d $1 ] ]; then
echo $(cd $1 && test `pwd` = `pwd -P`)
return 0
else
return 1
fi
}
@e0da
e0da / git-submodule-rm.sh
Created August 28, 2012 00:40 — forked from barraponto/git-submodule-rm.sh
git submodule-rm
#!/bin/bash
function actual_path() {
if [ [ -z "$1" ] -a [ -d $1 ] ]; then
echo $(cd $1 && test `pwd` = `pwd -P`)
return 0
else
return 1
fi
}
@e0da
e0da / rep.sh
Created October 11, 2012 21:43
watch like script
#!/bin/bash
#
# st_repeat HELP:
# st_repeat [-d <delay>] [-i] [-c <count>] [-k] <command>
# Repeat the given command.
#
# By default, this command will exit upon success, unless -i or -c are given.
#
# -d (default 2) specifies how long to wait between iterations
# -i will repeat the command indefinitely

Signing SCALE 11 stuff notes

Sending your signature

Install gpg from wherever. OS X: brew install gpg

Download the keyring from the email to ~/Desktop/

cd ~/Desktop && wget http://www.phildev.net/scale/scale11x-keyring.gpg
@e0da
e0da / README.md
Last active December 17, 2015 08:28 — forked from keeperofthenecklace/Testing REST APIs with Cucumber and Rack::Test
Testing REST APIs with Cucumber and Rack::Test

First attempting to use Capybara directly, you will ran into issues when trying to set HTTP header. Using Basic HTTP Authentication requires that we needed to set the header. Also we need to set the Content-Type and Accept headers to ensure that Rails handles the input and output correctly. When using Rack, Capybara delegates request and response handling down to Rack::Test. So I used Rack::Test directly in my step definitions, and it works. Rack::Test has a module called Rack::Test::Methods that can be mixed into a class to provide it with methods for get, post, put, delete as well as last_request, last_response, header and more. I mixed Rack::Test::Methods into the Cucumber world at the top of our API steps file like so:

@e0da
e0da / query.sql
Created September 25, 2013 23:51
SELECT "message_images"."id" AS t0_r0,
"message_images"."name" AS t0_r1,
"message_images"."name_on_disk" AS t0_r2,
"message_images"."entity_id" AS t0_r3,
"message_images"."created_by" AS t0_r4,
"message_images"."create_method" AS t0_r5,
"message_images"."created_on" AS t0_r6,
"message_images"."modified_by" AS t0_r7,
"message_images"."updated_on" AS t0_r8,
"message_images"."activate_at" AS t0_r9,
dan@app05:/nutricate/production/app$ git status
# On branch deploy
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: admin/config/email.yml
# modified: admin/config/environments/admin.rb
# modified: admin/config/initializers/recaptcha.rb
# modified: instance/init_scripts/admin
@e0da
e0da / .Xdefaults
Created October 31, 2013 18:47 — forked from yevgenko/.Xdefaults
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
# aptitude is incompatible with a terminal in solarized dark.
# So we need to tweak aptitude's color style.
# Put the following lines in `/etc/apt.conf` or `~/.aptitude/config`.
Aptitude::UI::Styles {
Default {
bg default;
};
DepBroken {
fg white;
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Solarized theme for pantheon-terminal
see http://ethanschoonover.com/solarized
"""
import posixpath
import sys
from gi.repository import Gio