Skip to content

Instantly share code, notes, and snippets.

View ClaudioFloreani's full-sized avatar

Claudio Floreani ClaudioFloreani

View GitHub Profile
@lusis
lusis / irbrc.rb
Created January 26, 2011 16:07
Add this to disable irb echo
# via http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html#echo
def irb_verbosity_toggle
irb_context.echo ? irb_context.echo = false : irb_context.echo = true
end
@thermistor
thermistor / assets.rake
Created October 20, 2011 13:55 — forked from shedd/assets.rake
Check asset encoding for valid UTF-8
namespace :assets do
desc "Check that all assets have valid encoding"
task :check => :environment do
paths = ["app/assets", "lib/assets", "vendor/assets"]
extensions = ["js", "coffee", "css", "scss"]
paths.each do |path|
dir_path = Rails.root + path
@chrisjacob
chrisjacob / application.html.erb
Created August 11, 2013 13:18
Rails pretty print Request.env in your view template Thx: https://www.ruby-forum.com/topic/129732
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<%= yield %>
<%= debug(PP.pp(request.env, "")) if Rails.env.development? %>
</body>
</html>
@christopheranderton
christopheranderton / macosx-contextmenu-automator-svg2eps.md
Last active October 25, 2023 09:38
Add a ”SVG to EPS Converter” Service to your context menu (Right-Click Menu) in macOS/Mac OS X (Tested in Mac OS X El Capitan 10.11.6, but should work in some older versions and Sierra as well) using Homebrew installed svg2pdf and pdftops (Poppler) with Automator.app

1. What you need

  • macOS/Mac OS X (tested only on El Capitan, but should work on Sierra and older versions)
  • Xcode Command Line Tools / Xcode
  • Homebrew (http://brew.sh/)
  • svg2pdf (via Homebrew)
  • Poppler (via Homebrew)

2. Installing Homebrew, svg2pdf and Poppler