Skip to content

Instantly share code, notes, and snippets.

@meleyal
meleyal / error
Created September 2, 2011 08:51
typus admin user
undefined local variable or method `admin_user' for Admin::StudentsController:Class
@meleyal
meleyal / fileapi_test.patch
Created June 24, 2011 10:50
Modernizr test for File API support
From 509d6f93d51efaee274d267c030ac2855aa799d7 Mon Sep 17 00:00:00 2001
From: meleyal <[email protected]>
Date: Fri, 1 Apr 2011 00:25:34 +0200
Subject: [PATCH] add test for File API support
---
modernizr.js | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modernizr.js b/modernizr.js
@meleyal
meleyal / reveal.css
Created March 26, 2011 09:10
Apple.com reveal fx
body { background:url(http://images.apple.com/global/elements/quicktime/loading.gif) no-repeat 50% 150px; }
body.loaded { background:transparent; }
#showcase .content,
#promobar,
#itunes,
#globalfooter { opacity:0; -webkit-transition:opacity .5s; -moz-transition:opacity .5s; }
.loaded #showcase .content,
.loaded #promobar,
@meleyal
meleyal / app.js
Created March 18, 2011 15:08
simple backbone example
var App = {
initialize: function() {
new App.Controller();
Backbone.history.start();
}
};
@meleyal
meleyal / active-record-recipes.rb
Created March 10, 2011 12:00
active record recipes
# random records
scope :random, limit(5).order("RANDOM()")
@meleyal
meleyal / fakeout.rake
Created March 2, 2011 17:23 — forked from matthutchinson/fakeout.rake
Fakeout.rake
# a simple/configurable rake task that generates some random fake data for the app (using faker) at various sizes
# NOTE: requires the faker or ffaker gem
require 'faker'
class Fakeout
# START Customizing
# 1. first these are the model names we're going to fake out
@meleyal
meleyal / namer.py
Created February 24, 2011 13:56 — forked from xwmx/namer.py
namer.py
#!/usr/bin/env python
# Name generating code
# Copyright (c) 2010 Ninite.com
#
# Released into the public domain - enjoy!
#
# Story at http://blog.ninite.com/post/620277259/how-ninite-was-named-by-a-computer-program
from datetime import datetime, date
@meleyal
meleyal / $.widget.bridge.template.js
Created February 17, 2011 11:17
jQuery $.widget.bridge template
// http://www.erichynds.com/jquery/using-jquery-ui-widget-factory-bridge/
var Widget = function(options, element){
this.options = options;
this.element = element;
this._init();
}
Widget.prototype = {
@meleyal
meleyal / widget-template.js
Created February 10, 2011 10:40 — forked from ehynds/widget-template.js
jquery.ui.widget template
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@meleyal
meleyal / meleyal.html
Created February 3, 2011 20:07
meleyal.com tumblr theme
<!DOCTYPE html>
<html lang="en">
<head>
<!--
meleyal
http://meleyal.com
https://gist.github.com/810100