# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* README | |
* mkdir one && mkdir two && mkdir three && touch one/blueprint-1.3.css && touch one/foobar.css && touch two/jquery.js && touch three/jquery-1.4.js | |
* | |
*/ | |
include('stack.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function action_hash($hash) | |
{ | |
Request::factory('application/index/?invite=a156cd8a95b52422032820f830db8fab') | |
->execute() | |
->send_headers() | |
->body(); | |
die(); | |
} | |
public function action_index() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
require 'pathname' | |
require 'appscript' | |
require 'json' | |
include Appscript, MacTypes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### config.ru | |
require_relative_fix 'helpers/init' | |
require_relative_fix 'models/init' | |
### user_model.rb | |
helpers do | |
def private | |
if session[:user_id] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">Comix Sample</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' | |
require 'net/ssh' | |
require 'rainbow' | |
if ARGV[0] && ! ARGV[0].empty? | |
name = ARGV[0] | |
db_output = %x[ssh {} 'mysql -u{server user} -p{server password} -e "SHOW DATABASES"'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test</title> | |
<script> | |
if (window.location.search == '?phonegap') | |
{ | |
document.getElementsByTagName('html')[0].className = 'phone-gap' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Game = function Game() { | |
this.marks = []; | |
}; | |
Game.prototype.add_mark = function add_mark(pins) { | |
this.marks.push(pins); | |
}; | |
Game.prototype.score = function score() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tower of Hanoi | |
// http://www.dynamicdrive.com/dynamicindex12/towerhanoi.htm | |
var Hanoi = function Hanoi() { | |
}; | |
Hanoi.prototype.solve = function solve(disks) { | |
// Solve it! | |
} |
OlderNewer