Skip to content

Instantly share code, notes, and snippets.

View markprovan's full-sized avatar

Mark Provan markprovan

View GitHub Profile
filetype off
filetype plugin indent on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
Bundle 'vim-ruby/vim-ruby'
filetype off
filetype plugin indent on
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'mattn/webapi-vim'
Bundle 'mattn/gist-vim'
public boolean breadthFirstSearch(String s) {
String currentNode;
ArrayList<String> queue = new ArrayList<String>();
queue.add("MI");
Boolean found = false;
int iterations = 0;
while (found == false) {
// Update iteration count
iterations++;
<img src="https://s3-eu-west-1.amazonaws.com/plantedd-blog-irish/Slug_Infographic.jpg" _mce_src="https://s3-eu-west-1.amazonaws.com/plantedd-blog-irish/Slug_Infographic.jpg" width="540">
<p>Slugs: Know Your Enemy - An infographic by the team at <a href="http://www.plantedd.com" _mce_href="http://www.plantedd.com">Plantedd</a></p>
@markprovan
markprovan / form.html.erb
Created August 16, 2012 18:02
form.html.erb
<div class="span4">
<%= simple_form_for @project_membership do |f| %>
<%= f.association :user, :prompt => "Select a User" , :label => false %>
<%= f.hidden_field :project_id, :value => @project.id %>
<%= f.submit "Add User", :class => "btn btn-small btn-success pull-right" %>
<% end %>
</div>
@markprovan
markprovan / server.coffee
Created July 18, 2012 19:00
CoffeeScript Node Web Server
http = require("http")
http.createServer((req, res) ->
res.writeHead(200, "Content-Type": "text/html")
res.end("<h1>Hello World</h1>")
).listen(1337, "127.0.0.1")
console.log("Server running at http://localhost:1337")
@markprovan
markprovan / businesses_controller.rb
Created June 14, 2012 22:07
Businesses Controller
class BusinessesController < ApplicationController
def index
@businesses = JSON.parse("http://209.61.142.61/api/businesses.json")
end
def show
@business = JSON.parse("http://209.61.142.61/api/businesses/2.json")
end
end
* executing `deploy'
triggering before callbacks for `deploy'
* executing `deploy:check_revision'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote [email protected]:markprovan/dropwall.git master"
command finished in 2658ms
* executing "if [ -d /home/ubuntu/apps/dropwall/shared/cached-copy ]; then cd /home/ubuntu/apps/dropwall/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 27e8423a05c48851a87859f060da743118ce5c0d && git clean -q -d -x -f; else git clone -q [email protected]:markprovan/dropwall.git /home/ubuntu/apps/dropwall/shared/cached-copy && cd /home/ubuntu/apps/dropwall/shared/cached-copy && git checkout -q -b deploy 27e8423a05c48851a87859f060da743118ce5c0d; fi"
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_view/renderer/template_renderer.rb:28:in `determine_template'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_view/renderer/template_renderer.rb:10:in `render'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/abstract_controller/rendering.rb:109:in `_render_template'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_view/renderer/renderer.rb:17:in `render'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_controller/metal/streaming.rb:225:in `_render_template'
2012-05-01T22:58:52+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_view/renderer/rendere
#FILE
module Amazon
class Products
def self.hello_world
return "Hello World!"
end
def search(query)
request = self.build_request(query)