A technique for writing parsers.
- Easy to understand
- Generally applicable
- Full power of the programming language at your disposal
- Declarative
| module AMS | |
| module V09 | |
| class Serializer < ActiveModel::Serializer | |
| def serializable_hash(adapter_options = nil, | |
| options = {}, | |
| adapter_instance = self.class.serialization_adapter_instance) | |
| object.nil? ? nil : super | |
| end | |
| end |
Setup
Dip your beak
The APIs are thorough and awesome
| /** | |
| NOTE: | |
| Assumes env contains aws credentials: | |
| AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY | |
| AWS_SECRET_KEY_ID or AWS_SECRET_KEY | |
| and AWS_REGION_NAME (e.g. 'US-EAST-1') | |
| see EnvAuth() below | |
| */ |
| #!/bin/bash | |
| # dontforget | |
| # | |
| # A stupid script for short term reminders in bash | |
| # | |
| # Arguments just need to contain a number and a bunch of words. | |
| # | |
| # The number can be anywhere in the arguments, but there shouldn't | |
| # be any other numeric digits. | |
| # |
| / In app/views/shared/ | |
| #dev-badge | |
| span= Rails.env | |
| span It ain't production! |
| require 'warden/github' | |
| class SidekiqGithubChecker | |
| def self.registered(app) | |
| app.helpers do | |
| def warden; env['warden'] end | |
| def github_organization_authenticate!(name) | |
| unless warden.user.organization_member?(name) | |
| halt [401, {}, ["You don't have access to organization #{name}"]] | |
| end |
There are many options available for tuning ruby memory management: https://github.com/ruby/ruby/blob/trunk/gc.c#L7420-L7444
The one that gets the most attention is RUBY_GC_HEAP_GROWTH_FACTOR, which is the only one Heroku suggests adjusting: https://devcenter.heroku.com/articles/ruby-memory-use#gc-tuning
I've often wondered what the drawback was for setting RUBY_GC_HEAP_GROWTH_FACTOR quite low for a webapp.
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index: