create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc "Dumps the database to db/APP_NAME.dump" | |
| task :dump => :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd |
| #!/usr/bin/ruby -w | |
| FILE_NAME = "x" | |
| printf "%-20s %p\n%-20s %p\n", | |
| "Default external", Encoding.default_external, | |
| "Default internal", Encoding.default_internal | |
| # p File.instance_methods.grep(/enc|opt/) |
| class CarElement | |
| def accept(visitor) | |
| raise NotImpelementedError.new | |
| end | |
| end | |
| module Visitable | |
| def accept(visitor) | |
| visitor.visit(self) | |
| end |
| class PurchaseApprover | |
| # Implements the chain of responsibility pattern. Does not know anything | |
| # about the approval process, merely whether the current handler can approve | |
| # the request, or must pass it to a successor. | |
| attr_reader :successor | |
| def initialize successor | |
| @successor = successor | |
| end |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| # Postgresql fancy datatypes! | |
| * array | |
| * hstore (=~ hash) | |
| * json | |
| * jsonb | |
| Philippe Creux - [@pcreux](http://twitter.com/pcreux) |
| development: | |
| adapter: postgresql | |
| encoding: utf8 | |
| database: campflame_development | |
| pool: 5 | |
| host: '' | |
| test: | |
| adapter: postgresql | |
| encoding: utf8 |
This document details some tips and tricks for creating redux containers. Specifically, this document is looking at the mapDispatchToProps argument of the connect function from [react-redux][react-redux]. There are many ways to write the same thing in redux. This gist covers the various forms that mapDispatchToProps can take.