Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repoSource: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repoHere's what I did to get things working.
Yep, over at: https://developer.apple.com
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| # Let's try out a table with kramdown class tag | |
| | A simple | table | | |
| | with multiple | lines| | |
| {: .my-class } |
| require "active_record" | |
| ActiveRecord::Base.establish_connection('postgres:///testing') | |
| ActiveRecord::Migration.verbose = false | |
| ActiveRecord::Migration.class_eval do | |
| create_table :played_quizzes, force: true do |t| | |
| t.integer :player_ids, array: true | |
| t.json :quiz_snapshot | |
| end |
| # In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
| # variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
| # in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
| # gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
| # Add the following to your shell init to set up gpg-agent automatically for every shell | |
| if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
| source ~/.gnupg/.gpg-agent-info | |
| export GPG_AGENT_INFO | |
| else |
| class DecoratorClone | |
| def initialize(model) | |
| @model = model | |
| end | |
| def method_missing(m, *args) | |
| raise NameError, "Decorator method '#{m}' not found" unless @model.respond_to?(m) | |
| @model.send(m, *args) | |
| end | |
| end |
| require 'benchmark' | |
| require 'benchmark/ips' | |
| require 'ostruct' | |
| require 'active_model' | |
| BillingAddressStruct = Struct.new(:street, :city, :zipcode, :country, :state) | |
| BillingAddressOpenStruct = OpenStruct | |
| BillingAddressStructFromHash = Struct.new(:street, :city, :zipcode, :country, :state) do |
| require 'sidekiq/api' | |
| # BulkReindexer | |
| module BulkReindexer | |
| def self.reindex_model(model, promote_and_clean = true) | |
| puts "Reindexing #{model.name}..." | |
| index = model.reindex(async: true, refresh_interval: '30s') | |
| puts "All jobs are in queue. Index name: #{index[:index_name]}" | |
| loop do | |
| # Check the size of queue |