Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
  • Brisbane, Australia
  • Twitter @drnic
View GitHub Profile
View patch.diff
diff --git a/jobs/mysql_gateway/templates/mysql_gateway.yml.erb b/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
index 82c41f3..8aa1059 100644
--- a/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
+++ b/jobs/mysql_gateway/templates/mysql_gateway.yml.erb
@@ -19,6 +19,7 @@ nats_props = properties.send(nats_props_name)
nats = "nats://#{nats_props.user}:#{nats_props.password}@#{nats_props.address}:#{nats_props.port}"
lifecycle = properties.service_lifecycle
cc_api_version = gateway.cc_api_version || "v1"
+unique_id = 'foobar_mysql_uniq'
%>
@drnic
drnic / validate_local_cache.sh
Last active Dec 11, 2015 — forked from raggi/validate_local_cache.sh
Version of validate_local_cache.sh for OS X
View validate_local_cache.sh
#!/usr/bin/env sh
# http://raamdev.com/2008/howto-install-md5sum-sha1sum-on-mac-os-x/
if ! which md5 > /dev/null; then
echo "md5 should be on your OS X"
exit 1
fi
if ! which curl > /dev/null; then
View survey.md

What did you do to get good at Rails?

Write apps. Deploy them.

Who taught you what you know?

I learnt most stuff for myself. Eventually I got into #caboose and was able to ask a lot more questions directly to the people that wrote rails + the plugins I used.

Do you have any fond (or not so fond) memories of your learning experiences?

View default hoe tasks
rake check_manifest # debug # Verify the manifest.
rake clean # # Clean up all the extras.
rake config_hoe # debug # Create a fresh ~/.hoerc file.
rake docs # publish # Build the RDoc HTML Files
rake install_gem # package # Install the package as a gem.
rake multi # test # Run the test suite using multiruby.
rake release # package # Package and upload the release.
rake test # test # Run the test suite.
# should probably just go on clean or clobber
@drnic
drnic / shakespeare_word_count.rb
Created Sep 15, 2009 — forked from jashkenas/count_shakespeare.rb
added a sample callback_url to postbin
View shakespeare_word_count.rb
#!/usr/bin/env ruby -rubygems
require 'restclient'
require 'json'
# Let's count all the words in Shakespeare.
RestClient.post('http://cloud-crowd.local/jobs',
{:job => {
@drnic
drnic / env.rb
Created Sep 3, 2009 — forked from tpope/env.rb
Setting webrat modes based on scenario tags
View env.rb
# Enable Webrat's Selenium mode if one or more scenarios is tagged @selenium
Webrat.configure do |config|
config.mode = :rails
ObjectSpace.each_object(Cucumber::Ast::Features) do |features|
config.mode = :selenium if features.tag_count('selenium').nonzero?
end
end
View add_data_spec.js
require("spec_helper.js");
require("../../public/javascripts/add_data.js");
Screw.Unit(function(){
describe("AddData", function(){
describe('adding rows', function() {
...snip...
@drnic
drnic / gist:38843
Created Dec 22, 2008 — forked from peterc/gist:33337
template for rails
View gist:38843
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"