Skip to content

Instantly share code, notes, and snippets.

View rossjourdain's full-sized avatar

Ross Jourdain rossjourdain

  • Wellington, New Zealand
View GitHub Profile
@paulnicholson
paulnicholson / powssl
Last active January 15, 2025 19:40
ssl with pow using stud

Instructions

  • Install stud $ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
  • Download and install the powssl script $ curl https://gist.githubusercontent.com/paulnicholson/2050941/raw/7e4d2178e3733bed18fdfe737277c3cb72241d39/powssl > ~/bin/powssl $ chmod +x ~/bin/powssl
  • Run powssl to create development certificate and configure stud.
  • $ powssl
@potomak
potomak / _flash.html.erb
Created January 12, 2012 14:35
Rails flash messages using Twitter bootstrap
<% [:notice, :error, :alert].each do |level| %>
<% unless flash[level].blank? %>
<div class="alert-message <%= flash_class(level) %>">
<a class="close" href="#">×</a>
<%= content_tag :p, flash[level] %>
</div>
<% end %>
<% end %>
@agmcleod
agmcleod / to_kml.rb
Created April 12, 2011 15:39
Parse csv data to KML format.
# copy and paste the code and save as a ruby file (.rb extension). Works with ruby 1.8.7 (default version on Snow Leopard).
# With the CSV file containing the data, run the script with the following syntax:
# ruby to_kml.rb <clientname> <filename>
# So if this was for DAC Group, and the file was locations.csv:
# ruby to_kml.rb DAC_Group locations.csv
#
# CSV Formatting requirements:
#
# Must contain columns: name, address, lat, lng. You may leave other columns in there if you wish. There is no downfall to doing so.
# To get lat/lng values, use the address or zipcode data that you have, and paste it into the form here: out2launchdigital.com/pagetorrent/geocoder/
#!/usr/bin/env ruby
#
# Originally written by http://redartisan.com/tags/csv
# Added and minor changes by Gavin Laking
# Rewritten by Andrew Bennett for Ruby 1.9
#
# Usage: ruby csv_to_fixture.rb file.csv [--json]
#
# "id","name","mime_type","extensions","icon_url"
# "1","unknown","unknown/unknown","||","/images/icon/file_unknown.gif"