- These notes are meant to follow reading the README. Please start there.
- Primary interface is the
has_paper_trail
class method added toActiveRecord::Base
. - Calling this method adds some associations and callbacks to the model.
- These associations are to
PaperTrail::Version
models or its ancestors all which inheritActiveRecord::Base
. ThisActiveModel::Concern
module provides all the features. - Versions can be in many tables and a model may have many version types [1](https://github.com/airb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
bootcmd: | |
- | | |
/bin/bash <<-'EOS' | |
#!/bin/bash | |
exec > >(tee /root/log.txt) | |
exec 2>&1 | |
set -x | |
set -e | |
if [ -e /new ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'gemoji' | |
require 'benchmark' | |
require 'benchmark/ips' | |
task :default => :benchmark | |
task :benchmark do | |
regex = /([^\u0000-\uD7FF\uE000-\uFFFF])/ | |
replacement = "�" |
- Clean Coders - Uncle Bob
- RubyRouges
- Ruby Tapas - from Avdi
- Watch Me Code - JavaScript and Node
- MetaCasts - Go mixed with JS Frontend Apps
- Vimcasts
- Build Podcast
- Frontend Masters - impressive list of contributors
- awesome python - Large list like this one
- virtualenv - a tool to create isolated Python environments
- virtualenvwrapper - virtualenv extensions
- virtualenvwrapper oh-my-zsh plugin
- pyenv - Simple Python version management
- Queues are distributed
- Queues are limited to 120000 in-flight messages (use more small queues instead of one large queue)
- Queues may have any number of clients sending/receiving messages at once
- Queues can be created with a built in delay on message visibility
- Queues can be created just for dumping messages whose processing has failed
The goal of this spike is to determine the behavior of rails replication and sharding solutions, specifically when selecting against associated records. We would like to see reads distributed across slaves where not instructed to do otherwise. Like so in the Octopus api:
# contrived example that actually doesn't work in octopus 0.8.2
irb(main):002:0> Artist.first.albums.count
[Shard: slave1] Artist Load (1.3ms) SELECT `artists`.* FROM `artists` LIMIT 1
[Shard: slave2] (1.1ms) SELECT COUNT(*) FROM `albums` WHERE `albums`.`artist_id` = 1
=> 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Geoip | |
def self.geocode(ip) | |
Geoip::Block.geocode(ip) | |
rescue Mongoid::Errors::DocumentNotFound | |
false | |
end | |
class Block | |
include Mongoid::Document |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host host1.example.com host2.example.com host3.example.com | |
ForwardAgent yes | |
IdentityFile ~/.ssh/id_rsa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Em.LinkView.reopen | |
init: -> | |
@_super() | |
Em.keys(@).forEach (key) => | |
if key.substr(0, 5) == 'data-' | |
@get('attributeBindings').pushObject(key) |