Skip to content

Instantly share code, notes, and snippets.

View FotoVerite's full-sized avatar

Matthew Bergman FotoVerite

View GitHub Profile
Kernel.module_eval do
def _(string)
string
end
end
#And how it's been used
<li><a href="#basic"><%= _('Basic Information')%></a></li>
<li><a href="#addresses"><%= _('Address')%></a></li>
package com.matthewbergman.exitstrategy.adapters;
import android.content.Context;
import android.content.res.Resources;
import android.database.Cursor;
import android.view.View;
import android.widget.ResourceCursorAdapter;
import android.widget.TextView;
import com.matthewbergman.exitstrategy.R;
import com.matthewbergman.exitstrategy.database.DataBaseHelper;
var Faker = require('../Faker');
return {
"name":Faker.Name.findName(),
"username":Faker.Internet.userName(),
"email":Faker.Internet.email(),
"address":{
"streetA":Faker.Address.streetName(),
"streetB":Faker.Address.streetAddress(),
"streetC":Faker.Address.streetAddress(true),
"streetD":Faker.Address.secondaryAddress(),
#!/bin/sh
#
# Usage: version [bump|minor|major]
#
#
# Increments Version or Shows latest version
#
version=$1
get_version=$(git tag | grep ^v*[0-9].[0-9].[0-9] | tr -d '[[:alpha:]]' | tail -1 | sort -n )
@FotoVerite
FotoVerite / gist:1438473
Created December 6, 2011 14:59
jistu npm fail
> jitsu@0.7.2-1 test /Users/fotoverite/github/jitsu
> vows test/commands/*-test.js test/*-test.js --isolate --spec
♢ jitsu/commands/apps
✓ This test requires jitsu be unauthorized
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
@FotoVerite
FotoVerite / gist:1438474
Created December 6, 2011 15:00
Jitsu vows fail
mismatch in remote request :
{ method: 'GET',
uri: 'http://api.mockjitsu.com:90210/apps/mickey/example-app',
headers:
{ Authorization: 'Basic bWlja2V5OnBvaXV5dHJld3E=',
'Content-Type': 'application/json' } }
{ method: 'GET',
uri: 'http://api.mockjitsu.com:90210/apps/mickey/jitsu',
headers:
Most of you who know me, know I can be very loud and more than a bit obnoxious. I know I've been very loud the past few days about SOPA.
We all know what is at stake. I won't talk down to you or think you don't realize how this concerns us. We are being fucking lazy.
We are so concerned with our day to day lives that we are forgetting how much Federal government can affect us and or interest.
What we do today could be made much more difficult to do well without good reason.
But more importantly, even if it doesn't, nothing much of substance will have changed. Because we were not the ones to stop it.
We, beyond anyone else, know how amazing the web is. How important it is to our lives and our communities. We have power, people.
We command million dollar businesses, we bring so much and money to the cities and states we reside in. We need to use this.
We need to call our representatives; but more than that, we need to state that we matter.
foreman:
nginx: 1
riak: 1
unicorn: 1
sidekiq: 1
nginx:
daemon: 'off'
listen: 8080
pid: tmp/pids/nginx.pid
path: /Users/fotoverite/github/generalassembly
@FotoVerite
FotoVerite / gist:2005568
Created March 9, 2012 07:52
Refactor of session_module
module SessionMethods
protected
def admin_logged_in?
unless current_user(Admin)
return false
else
return true
end
@FotoVerite
FotoVerite / robot.js
Created December 5, 2012 07:22
Zolmeister
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {