Skip to content

Instantly share code, notes, and snippets.

View zeevallin's full-sized avatar

Zee Vieira zeevallin

View GitHub Profile
<span id="cd-title">
Vanacast - The Last Roundup
</span>
@zeevallin
zeevallin / true_love.rb
Created September 12, 2012 05:37
True Love
# true_love.rb
class Zeeraw; def self.+(other); other == Tenderlove; end; end
class Tenderlove; def self.+(other); other == Zeeraw; end; end
# $ irb
# require './true_love.rb'
# irb> Zeeraw + Tenderlove
# irb> => true
@zeevallin
zeevallin / gist:3889522
Created October 14, 2012 19:09
This you can do with Sass.
@each $vendor in -webkit-, -moz-, -ms-, -o-, ""
#{$vendor}transform: skew(-5deg) rotate(-5deg)
@each $vendor in -webkit-, -moz-, ""
#{$vendor}box-shadow: 0 6px 12px rgba(0, 0, 0, .2)
@zeevallin
zeevallin / gist:4063661
Created November 13, 2012 02:48
Grids with Sass
@for $i from 1 through 12
$iUnitWidth: ($columnWidth + $gutterWidth)
$iMinWidth: ($i) * $iUnitWidth
$iMaxWidth: $iMinWidth + ($iUnitWidth - 1px)
@media (min-width: $iMinWidth) and (max-width: $iMaxWidth)
// ... grid code ...
@zeevallin
zeevallin / gist:4081197
Created November 15, 2012 20:53
WoW increased logging range
/console SET CombatLogRangeParty "200"
/console SET CombatLogRangePartyPet "200"
/console SET CombatLogRangeFriendlyPlayers "200"
/console SET CombatLogRangeFriendlyPlayersPets "200"
/console SET CombatLogRangeHostilePlayers "200"
/console SET CombatLogRangeHostilePlayersPets "200"
/console SET CombatLogRangeCreature "200"
class Awesome; end
class MacBook < Awesome; end
def (money)
 return MacBook.new if money.enough?
end
STREET = /(?<street>[^\d\,]{2,})/i
NUMBER = /(?<box>[\d]{2,5})/i
addresses = [
"BRAY PARK 4500",
"BRAY PARK, 4500",
"4500 BRAY PARK",
"4500, BRAY PARK"
]
en:
hello: "World"
sv:
hello: "Världen"
class Admin::RootController < AdminController
def index
start_at = 30.days.ago
end_at = Date.today
@first_date = (start_at.to_i * 1000)
@samples = Sample.where(:date.gte => start_at.to_date.to_s, :date.lte => end_at.to_date.to_s).order_by(date: :asc)
class AvatarUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
process :resize_to_fill => [200, 200]
process :convert => 'png'
end