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 usecases of submodules:
- Separate big codebases into multiple repositories.
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
$.fn.parsley.defaults = { | |
// basic data-api overridable properties here.. | |
inputs: 'input, textarea, select' // Default supported inputs. | |
, excluded: 'input[type=hidden], :disabled' // Do not validate input[type=hidden] & :disabled. | |
, trigger: false // $.Event() that will trigger validation. eg: keyup, change.. | |
, animate: true // fade in / fade out error messages | |
, animateDuration: 300 // fadein/fadout ms time | |
, focus: 'first' // 'fist'|'last'|'none' which error field would have focus first on form validation | |
, validationMinlength: 3 // If trigger validation specified, only if value.length > validationMinlength | |
, successClass: 'has-success' // Class name on each valid input |
If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.
Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb
to comment out the faulty Windows check and add a real SSH check:
# if Util::Platform.windows?
# raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
# :port => ssh_info[:port],
# :username => ssh_info[:username],
# :key_path => ssh_info[:private_key_path]
Get the Heroku db as detailed here: | |
http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup | |
1. heroku pgbackups:capture | |
2. heroku pgbackups:url <backup_num> #=>backup_url | |
- get backup_num with cmd "heroku pgbackups" | |
3. curl -o latest.dump <backup_url> | |
Then locally do: | |
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump |
Tested on: Datatable 1.8.2, Rails 3.1.3 | |
This example uses Coffeescript and Haml (you should too :-) ) | |
The following is an example of Datatables server-side processing of a table | |
which displays a user's song list including the songs' artist names. In | |
Rails, Song and Artist are ActiveRecord models in a one artist-many song relat. | |
1a. the Rails controller code | |
class SongsController < ApplicationController |