Skip to content

Instantly share code, notes, and snippets.

View drnic's full-sized avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
View GitHub Profile
@drnic
drnic / patch.diff
Last active December 18, 2015 18:10 — forked from kushmerick/gist:5820810
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 December 11, 2015 23:39 — forked from raggi/validate_local_cache.sh
Version of validate_local_cache.sh for OS X
#!/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
@drnic
drnic / .gitignore
Created October 1, 2010 22:18 — forked from mloughran/README.md
twitter.json
@drnic
drnic / survey.md
Created November 2, 2009 01:10 — forked from radar/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?

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 September 15, 2009 00:46 — forked from jashkenas/count_shakespeare.rb
added a sample callback_url to postbin
#!/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 September 3, 2009 10:41 — forked from tpope/env.rb
Setting webrat modes based on scenario tags
# 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
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 December 22, 2008 02:50 — forked from peterc/gist:33337
template for rails
# 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"