Skip to content

Instantly share code, notes, and snippets.

View lapluviosilla's full-sized avatar

Paul Strong lapluviosilla

View GitHub Profile
@lapluviosilla
lapluviosilla / brokenif.emblem
Created February 27, 2013 17:54
Emblem.js template that breaks when compressing with --minify option in brunch
.navbar.navbar-inverse
.navbar-inner
a.brand href="#" Home
#profile-pic.row-fluid.pagination-centered
if profile_pic_url
img src=profile_pic_url
else
i.img-polaroid.icon-user
.row-fluid.pagination-centered
/**
* Video Sync tool for fast seeking without
* breaking video because of an event overload
*
* Developed for ThinkWell Player
*/
(function($) {
//Shortcuts (to increase compression)
var videosync = 'videosync',
TRUE = true,
var imageCache = [];
// preload images and cache them for rapid loading
function preloadImages(paths) {
for (var i = paths.length; i--;) {
var cacheImage = document.createElement('img');
cacheImage.src = paths[i];
imageCache.push(cacheImage);
}
}
++++++++++[>+>+++>++++++>++++++++++>++++++++++>+++++++++++>+++++++++++<<<<<<<-]>>++>>>+++++>>+++++<<<<<<<[-]>>>>>>>>++++++++++[<<<<<<<<++++++++++>>>>>>>>-]<<<<<<<<[>>>+->>>+->+-<--++<<+->>><<<<<>>>>+-<<++--<<>+->+->>>-+<<<<<<<><-]<<<<<<
ActiveRecord::Base.class_eval do
class << self
# Ugly bit of metaprogramming to remove an existing validation
# @param type of validation. ex. :validates_uniqueness_of
# @param name of attribute to be validated. ex. :email
def remove_validation type, name
@validate_callbacks.reject! do |back|
proc = back.method
if proc.is_a?(Proc)
# Returns the name of method the proc was declared in
##############commands#################
run "rm .gitignore"
file '.gitignore', <<-ENDEND
*~
.bundle
nbproject/
.idea
.DS_Store
Thumbs.db
db/*.sqlite3