Skip to content

Instantly share code, notes, and snippets.

View gabriel403's full-sized avatar
💭
Hotty

Gabriel Baker gabriel403

💭
Hotty
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gabriel403 on github.
  • I am gabriel403 (https://keybase.io/gabriel403) on keybase.
  • I have a public key whose fingerprint is 250B 1EA9 5C01 316B BE8E 093C 6269 3E59 F708 3D64

To claim this, I am signing this object:

  • list droplets
  • delete droplets
  • create droplets
  • list images
  • delete private images
  • list ssh keys
  • delete ssh keys
  • create ssh keys
  • list regions
  • list sizes
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode,
Behat\MinkExtension\Context\MinkContext,
Behat\Behat\Context\Step,
Behat\Behat\Event\StepEvent;
<?php
// request comes in to router
$request = new Request($_GET, $_POST, $_SERVER);
$controllerName = $request->someAwesomeFunctionToWorkOutController(); // Product for instance
$actionName = $request->someAwesomeFunctionToWorkOutAction(); // get/new/index/whatever
$controller = new $controller;
//enable notification caching
NotificationCache::enableNotificationCrap();
$outputHtml = $controller->$actionName($request);
//by this point the whole request has been handled, all objects have been saved or changed or whatever
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
# Shortcuts
alias d="cd ~/Documents/Dropbox"
Vagrant.configure("2") do |config|
config.vm.define "dev", primary: true do |dev|
dev.vm.provider "virtualbox" do |v|
v.memory = 1024
end
end
config.vm.define "dev2" do |dev2|
dev2.vm.provider "virtualbox" do |v|
v.memory = 512
end
Content-Type:application/json;charset=UTF-8
{"id":null,"stage":"initial","updated_at":"Tue, 19 May 2015 14:23:50 GMT","created_at":"Tue, 19 May 2015 14:23:50 GMT","emailText":"initial email","emailStage":"initial"}
$app->map(['POST'], '/trails', function ($request, $response, $args) {
error_log(var_export($args, true));
error_log(var_export($request->getParsedBody(), true));
// $trail = Trail::create($request->getParsedBody());
// $response->write($trail->toJson());
module.exports = function(config){
config.set({
basePath : '../',
files : [
'bower_components/angular/angular.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js',
'bower_components/angular-modal-service/dst/angular-modal-service.js',
if not trail.stage_position?
trail.stage_position = 0
for history in trail.history
trail.stage_position = history.text.position if trail.stage_position < history.text.position
docker run --name fred-db -e MYSQL_USER=phinxdev -e MYSQL_PASSWORD=phinxdev -e MYSQL_DATABASE=phinxdev -e MYSQL_ROOT_PASSWORD=phinxdevroot -d mariadb
docker run -it --link fred-db:mysql --rm mariadb sh -c 'exec echo "$MYSQL_PORT_3306_TCP_ADDR"'
docker run -it --link fred-db:mysql -v $(pwd):/app diegomarangoni/hhvm:cli /app/vendor/bin/phinx migrate -e development -c /app/phinx.yml