Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am vanev on github.
  • I am vanev_ (https://keybase.io/vanev_) on keybase.
  • I have a public key whose fingerprint is 000D B7C2 3523 66A2 5CD1 F6B1 5857 A426 082F AD86

To claim this, I am signing this object:

console.log("erik")
console.log(4+5)
console.log([(4+5), ('Erik')]
// Uncaught SyntaxError: missing ) after argument list
console.log(['erik', 4+5])
console.index("NBA")
@vanev
vanev / group.rb
Last active August 29, 2015 14:10
Ordering `has_many, through` Association
class Group < ActiveRecord::Base
has_many :items, through: :items_group_components
has_many :items_group_components
# Whenever I ask for `group.items`, I'd like it to return the items in
# order, sorted by the items_group_components order.
end

Keybase proof

I hereby claim:

  • I am vanev on github.
  • I am vanev_ (https://keybase.io/vanev_) on keybase.
  • I have a public key whose fingerprint is 47FE 2437 2E2A 4175 F445 5A01 D87F 442B 18A1 C2BA

To claim this, I am signing this object:

@vanev
vanev / gist:7975642
Created December 15, 2013 17:24
Sample Page-Specific Stylesheet and Script Loading
# layouts/application.erb.html
...
<head>
...
<%= yield :styles %>
...
</head>
<body>
...
<%= yield :scripts %>
@vanev
vanev / Less Grid
Created November 29, 2013 19:37
A simple, responsive grid built using recursion in LESS.
@totalColumns: 12;
.grid {
&:after {
content: "";
display: block;
clear: both;
}
}