In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
require 'fiddle' | |
public def class=(new_class) | |
obj_ptr = Fiddle::Pointer.new 2*self.object_id | |
klass_ptr = Fiddle::Pointer.new 2*new_class.object_id | |
obj_ptr[8, 8] = klass_ptr.ref[0, 8] | |
end | |
class A | |
attr_accessor :a, :b, :c | |
end |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
#!/usr/bin/env ruby | |
require "openssl" | |
require 'digest/sha2' | |
require 'base64' | |
# We use the AES 256 bit cipher-block chaining symetric encryption | |
alg = "AES-256-CBC" | |
# We want a 256 bit key symetric key based on some passphrase | |
digest = Digest::SHA256.new |
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
###Quick links to get started:
http://nithinbekal.com/posts/rails-presenters/
http://eewang.github.io/blog/2013/09/26/presenting-the-rails-presenter-pattern/
This is a collection of links, examples and rants about Presenters/Decorators in Rails.
The course will have six weeks of lectures and assignments, followed by a final exam.
Yahoo! provides its GeoPlanet data as three separate TSV files, available for download here.
That's a database with some 17 million records: