Skip to content

Instantly share code, notes, and snippets.

View gabriel403's full-sized avatar
💭
Hotty

Gabriel Baker gabriel403

💭
Hotty
View GitHub Profile
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
# 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"
<?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
<?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;
  • list droplets
  • delete droplets
  • create droplets
  • list images
  • delete private images
  • list ssh keys
  • delete ssh keys
  • create ssh keys
  • list regions
  • list sizes

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:

class something (
env => 'dev'
) {
include 'something::params'
}
module FlashMessageHelper
def flash_message
html = ""
flash.each do |key, msg|
skey = key
if key == "notice"
skey = 'info'
end
html << (content_tag :div, msg, :class => "flash #{key} alert alert-#{skey}")
{
"builders": [{
"type" : "virtualbox",
"iso_url" : "http://releases.ubuntu.com/12.10/ubuntu-12.10-server-amd64.iso",
"iso_checksum" : "4bd3270bde86d7e4e017e3847a4af485",
"iso_checksum_type" : "md5",
"disk_size" : 80000,
"guest_os_type" : "Ubuntu_64",
"http_directory" : "preseed",
"ssh_username" : "vagrant",
{
"builders": [{
"type" : "virtualbox",
"iso_url" : "http://releases.ubuntu.com/12.10/ubuntu-12.10-server-amd64.iso",
"iso_checksum" : "4bd3270bde86d7e4e017e3847a4af485",
"iso_checksum_type" : "md5",
"guest_additions_attach" : true,
"guest_os_type" : "Ubuntu_64",
"ssh_username" : "packer",
"ssh_wait_timeout" : "30s",