Skip to content

Instantly share code, notes, and snippets.

View maxmanders's full-sized avatar

Max Manders maxmanders

View GitHub Profile
╰─$ bundle exec bin/examples sqs
Commands:
examples s_q_s help [COMMAND] # Describe subcommands or one specific subcommand
examples s_q_s receive # Receive a message from a test SQS queue
examples s_q_s send {message} # Send {message} to a test SQS queue
---
driver:
name: vagrant
customize:
memsize: 2048
numvcpus: 2
provisioner:
name: chef_zero
def bin_files
@cookbook.manifest[:files].collect{|file| file[:path].split("/")[2..-1].join("/") if file[:path] =~ /apps\/#{Regexp.quote(new_resource.name)}\/[^.]/}.compact || []
end
require 'rails_helper'
RSpec.describe DashboardController, type: :controller do
describe "Dashboard" do
before do
sign_in_as_a_valid_user
end
$ curl -XGET -H "Content-Type: application/json" -H "Accept: application/json" "http://api.example.dev:13000/v1/echo/wibble"
{"message":"wibble"}%
Rails.application.routes.draw do
namespace :api, :path => "", :constraints => { :subdomain => "api" }, :defaults => { :format => :json } do
namespace :v1 do
resources :users
get '/echo/:message', to: 'status#echo'
end
end
@maxmanders
maxmanders / gist:2f8c0d185f2d7ee70831
Created November 19, 2014 19:47
Spreadsheet Bracket Hell
(A45=Applications!B45,
if(Applications!P45='Risk Criteria'!$K$3,
'Risk Criteria'!$L$3,
if(Applications!P45='Risk Criteria'!$K$4,
'Risk Criteria'!$L$4,
if(Applications!P45='Risk Criteria'!$K$5,
'Risk Criteria'!$L$5,
if(Applications!P45='Risk Criteria'!$K$6,
'Risk Criteria'!$L$6,
"else clause"
class Group < ActiveRecord::Base
  validates :name, :presence => true
end
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::*"
<style type="text/css">
div.container {
width: 100%;
}
div.container table {
width: 600px;
}
table th {
text-align: right;
width: 150px;