Skip to content

Instantly share code, notes, and snippets.

@fro
fro / gist:1683557
Created January 26, 2012 16:15
the_sortable_tree gem: erb version of partials
# _children.html.erb
<%= content_tag :ol, raw(children) %>
# _controls.html.erb
<%-
edit = link_to '', polymorphic_url(node, :action => :edit), :title => t('.edit_this'), :class => 'button edit'
if opts[:has_children]
delete = link_to('', url_for(node),
:title => t('.delete'),
:method => :delete,
@fro
fro / scopes.txt
Created April 21, 2016 05:38 — forked from iambibhas/scopes.txt
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@fro
fro / Full Trace
Created March 17, 2016 12:40
Rails 3.2.22.2 with activeadmin 0.4.3
activeadmin (0.4.3) app/assets/stylesheets/active_admin/mixins/_sections.css.scss:6:in `box-shadow'
activeadmin (0.4.3) app/assets/stylesheets/active_admin/mixins/_sections.css.scss:6:in `section-header'
activeadmin (0.4.3) app/assets/stylesheets/active_admin/_forms.css.scss:16
activeadmin (0.4.3) app/assets/stylesheets/active_admin/_base.css.scss:9
app/assets/stylesheets/active_admin.css.scss:12
sass (3.4.21) lib/sass/tree/visitors/perform.rb:349:in `block in visit_mixin'
sass (3.4.21) lib/sass/stack.rb:98:in `block in with_mixin'
sass (3.4.21) lib/sass/stack.rb:115:in `with_frame'
sass (3.4.21) lib/sass/stack.rb:98:in `with_mixin'
sass (3.4.21) lib/sass/tree/visitors/perform.rb:347:in `visit_mixin'
source 'http://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.1.10'
gem 'pg', '0.12.0'
gem 'sprockets', '2.0.4'
gem 'sass-rails', '3.1.4'
gem 'coffee-rails', '3.1.1'
gem 'uglifier'
@fro
fro / MyCustomPlayer.as
Created January 17, 2013 15:41
This is a simplified pseudo-code example of my main Class which extend the (fl5) Player class
package {
// [ ... ]
// simplified pseudo-code to show the mecanism...
public class MyCustomPlayer extends Player {
// [ ... ]
private function setComponents():void {
@fro
fro / rspec-syntax-cheat-sheet.rb
Created November 10, 2011 10:09 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@fro
fro / config.log
Created March 23, 2015 17:25
config.log output after `$ rbenv install 1.9.2-p0` failed install
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --prefix=/Users/robert/.rbenv/versions/1.9.2-p0 --with-libyaml-dir=/usr/local/opt/libyaml
## --------- ##
## Platform. ##