Skip to content

Instantly share code, notes, and snippets.

View ztbrown's full-sized avatar
🕸️
you've found me on the world wide web

Zack Brown ztbrown

🕸️
you've found me on the world wide web
View GitHub Profile
$stats = {"oops": 0, "pursuit": 0, "haven": 0}
def game_loop()
open_road = ["The child gets their hands on some kind of lethal weapon", "You crash through a mandatory checkpoint. Guns blazing. In style.", "The child uses their powers to save your life. It's messy.", "You fall asleep on watch and the child wanders away", "You make food, there's a small chance it's lethal", "You are recognized in town and have to make a quick exit"]
open_road_rules = [lambda {|x| x[:oops] += 1}, lambda {|x| x[:pursuit] += 1}, lambda {|x| x[:haven] += 1}, lambda {|x| x[:oops] += 1; x[:pursuit] += 1}, lambda {|x| x[:oops] += 1}, lambda {|x| x[:pursuit] += 2}]
passing_through = ["You barter food from a criminal.", "The child uses their powers to save your life.", "You shoot someone to make a point", "The child is kidnapped, demands are made.", "The child wanders off when you aren't looking", "An old friend betrays you"]
passing_through_rules = [lambda {|x| x[:haven] += 1}, lambda {|x| x[:pursuit] += 1}, lambda {|x| x[:
$scope.gridOptions.onRegisterApi = function(gridApi){
//set gridApi on scope
$scope.gridApi = gridApi;
gridApi.selection.on.rowSelectionChanged($scope,function(row){
//Call onItemSelected
});
gridApi.selection.on.rowSelectionChangedBatch($scope,function(rows){
//Call onItemSelected
});
module Api
module V1
class TokensController < ApiController
skip_before_filter :authenticate_user!, only: [:create, :reset]
before_action :load_and_authorize
def create
user = User.find_by_email(params[:email])
@ztbrown
ztbrown / Heroku Multi Buildpack
Created March 14, 2014 14:57
Set BUILDPACK_URL environment variable to Heroku Multi Buildpack
heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
cat .buildpacks
https://github.com/stephanmelzer/heroku-buildpack-nodejs-grunt-compass.git
https://github.com/heroku/heroku-buildpack-ruby.git
@ztbrown
ztbrown / Heroku Grunt Buildpack
Created March 14, 2014 14:56
Set BUILDPACK_URL environment variable in Heroku to the buildpack for node/grunt/compass
heroku config:set BUILDPACK_URL=https://github.com/stephanmelzer/heroku-buildpack-nodejs-grunt-compass.git
@ztbrown
ztbrown / Heroku Ruby Buildpack
Created March 14, 2014 14:55
Set BUILDPACK_URL environment variable in Heroku
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby
@ztbrown
ztbrown / Yeoman Scaffold
Last active August 29, 2015 13:57
Scaffolding, building, testing and serving a new angular app with Yeoman
npm install -g generator-angular # install generator
yo angular # scaffold out a AngularJS project
bower install angular-ui # install a dependency from Bower
grunt test # test your app
grunt serve # preview your app
grunt # build the application for deployment
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.12 (GNU/Linux)
owGbwMvMwMR47PeWq+VzJrMznj6wPIkhWPaXbbVSUn5KpZJVtVJ2KphKy8xLTy0q
KMrMK1GyUrK0TEk0TTYwNEwzNE6xSDEyt0xMTjE3Nkg1N0hKNk81MzJIMk1NSzNU
0lHKyC8G6QAak5RYnKqXmQ8UA3LiM1OAoq7mBk7O5q5A9U6mrm5uIPWlYAlLY3Oz
tESzRAODpMRUC8skSwuTNIukxOTENHOjNAsDA5DC4tSivMTcVKDqqsTkbKVaHSWg
SFlmcirIvVCZ9MySjNIkNNUlSUX55XkgDSWVBSCR8tSkeKje+KTMvBSgX4FaylKL
ijPz85SsDIEqk0syQZoNjS1NTMyNTY2NdZRSKwoyi1LjM0EqTM3NgK4yMNBRKihK
LVOyyivNyQG5pzAvHygLtCgxHWhPcWZ6XmJJaVGqUm0nkwwLAyMTAxsrEyi8Gbg4
$mail = Mage::getModel('core/email');
$mail->setBody('Hello! - <br/> <br/> The Order Export module just ran at ' . $currenttime . $orders . " It was " . $result . '<br/><br/> Thanks! <br/> <br/> <b>Magento Robot</b>' );
$mail->setSubject('Order Export -- ' . $time);
$mail->setFromEmail('robot@naturesonedirect.com');
$mail->setFromName("Magento Robot");
$mail->setType('html');// YOu can use Html or text as Mail format
//Send to Sue
//Full name and email redacted before uploading to github
$mail->setToName('');
$mail->setToEmail('');