Skip to content

Instantly share code, notes, and snippets.

View CamonZ's full-sized avatar

Rafael Simon Garcia CamonZ

View GitHub Profile
@CamonZ
CamonZ / osm2geo.js
Created August 20, 2012 03:44 — forked from tecoholic/osm2geo.js
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*
@CamonZ
CamonZ / venezuela_states_and_municipalities.json
Created August 18, 2012 06:43
Administrative Division of Venezuela with States and Municipalities in geoJSON format. Shapefile is originally from GADM, although I simplified the vectors with QGIS to reduced the filesize of the generated json
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CamonZ
CamonZ / sample
Created November 29, 2010 04:16 — forked from anonymous/sample
<% @presses.each_slice(3) do |presses_slice| %>
<tr>
<% presses_slice.each do |press| %>
<td><%= press.title %></td>
<% end %>
</tr>
<% end %>
@CamonZ
CamonZ / .gitignore
Created November 27, 2010 17:20 — forked from karmi/.gitignore
.DS_Store
*.log
tmp/
namespace :deploy do
task :start do; end
task :stop do; end
desc "restart passenger server"
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
// geo-location bridge
function getLocation(callback){
if (getLocation.cache) return callback(getLocation.cache);
if (Modernizr.geolocation) {
var geocallback = function(position) {
callback(getLocation.cache = {
"lat": position.coords.latitude,
"lon": position.coords.longitude,
describe "should return a string as a latitude and longitude csv" do
it {should respond_to(:latlong)}
@p = Factory.create(:store)
@p.latlong.should equal("10.502792,-66.842322")
end
if RAILS_ENV == 'production'
Paperclip.options[:command_path] = "/usr/bin"
else
Paperclip.options[:command_path] = "/usr/local/bin"
end
recent_photographs GET /photographs/recent(.:format) {:action=>"recent", :controller=>"photographs"}
photographs GET /photographs(.:format) {:action=>"index", :controller=>"photographs"}
photograph GET /photographs/:id(.:format) {:action=>"show", :controller=>"photographs"}
- # app/views/posts/_post.html
%h1= post.title
...
%p Actions:
%ul
- # checking the authorizations on the view...
%li= edit_post_path(post) if current_user.can?(:update, post)
%li= post_path(post) if current_user.can?(:read, post)