Skip to content

Instantly share code, notes, and snippets.

@mza
mza / README.md
Last active October 26, 2015 21:30
fresh block
{
"Id": "Policydbgap",
"Statement": [
{
"Sid": "Stmtdbgap",
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME /*",
@mza
mza / validate.rb
Created May 6, 2011 10:32
Really simple CloudFormation template validation
require 'rubygems'
require 'fog'
require 'yaml'
config = YAML::load_file(File.dirname(__FILE__) + '/config.yml')
cf = Fog::AWS::CloudFormation.new(
:aws_access_key_id => config['key'],
:aws_secret_access_key => config['secret']
)
## READ ME
I have a user model (restful_authentication) and would like a manager to be able to update the status of his users all at once. The users have three different statuses: active, inactive, guest. Guest is the default.
Using radio buttons I would like the manager to have free reign over how many users update at any one time.
There is a way to do this using loops, but that can get expensive quickly so I am looking for a better method.
@mza
mza / gist:8787
Created September 4, 2008 14:49
Task: Protein lookup
Find protein structure for 1MBN
From PDB
Return sequence of protein
Task: Blast
Run BLAST
Using the protein sequence from Protein lookup task
On uniprot
Select all hits with e < 0.00001