I am learning Rails.
Here are the things that make me go GRR
- I see code like this
MyModel.like "apples"
. Is there any documentation on that? or did someone write the methodlike
? Is there a cool way to dolikes
relationally?
A good programming language is expressive. That means I can easily turn the thoughts of my head into code. A good programming language is easy to read. It's important for code to be read because code lives. Others edit it, extend it, learn from it. A good programming language is fast.
#!/usr/bin/env coffee | |
cgi = require "/root/sites/coffee-cgi/cgi" | |
sys = require "sys" | |
http = require "http" | |
http.IncomingMessage = cgi.Request | |
http.ServerResponse = cgi.Response | |
connect = require "connect" |
<!doctupe html> | |
<html> | |
<head> | |
<title> ABC | |
</title> | |
<meta content="yes" name="apple-mobile-web-app-capable" /> | |
<meta name="viewport" content="width=device-width, user-scalable=no" /> | |
<script src="http://includes.the.tl/zepto/zepto.js"></script> | |
<script src="http://includes.the.tl/underscore.js"></script> |
// Disable magic quotes | |
if (get_magic_quotes_gpc()) { | |
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); | |
while (list($key, $val) = each($process)) { | |
foreach ($val as $k => $v) { | |
unset($process[$key][$k]); | |
if (is_array($v)) { | |
$process[$key][stripslashes($k)] = $v; | |
$process[] = &$process[$key][stripslashes($k)]; | |
} else { |
/*! | |
* jQuery UI 1.8.9 | |
* | |
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* http://docs.jquery.com/UI | |
*/ | |
(function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.9",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, |
|test|table| |another| test|
x = 1 | |
log x | |
log "hello #{name}" |