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
/* originally written by Chouser. taken from clojure google group, http://groups.google.com/group/clojure | |
discussion title: clojure -> javascript | |
http://groups.google.com/group/clojure/browse_frm/thread/83c3c18951a764e2/62d630249e75599c?#62d630249e75599c | |
Some (hopefully annotated) additions are by Shane Daniel. | |
of note: Karl Krukow's streamlined port of Clojure data structures to Java. | |
https://github.com/krukow/clj-ds | |
*/ |
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
// goog.require('goog.structs.LinkedMap'); | |
goog.provide('sim.examples.linkedMap_'); | |
sim.examples.linkedMap_.getKeyByIndex = function getKeyByIndex(i, lMap) { | |
return lMap.getKeys()[i]; | |
}; | |
sim.examples.linkedMap_.getValueByIndex = function getValueByIndex(i, lMap) { | |
return lMap.getValues()[i]; |
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 class="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Example Facebook Page Like Box</title> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<div id="main-wrapper" style="height: 100%;"> | |
</div><!-- end main wrapper --> |
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
// example anonymous function | |
var doop = (function(){var thisFunc = arguments.callee; thisFunc.foo = 'bar'; return arguments.callee.foo;}); | |
// returns null | |
doop.foo; | |
// ...until it's called once. both return "bar". | |
doop(); | |
doop.foo; |
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> | |
<title>Example Backbone Skeleto</title> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<style> | |
.hidden{ | |
display: none !important; | |
} |
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 sliding = false; // variable outside function scope to detect a slide is in progress | |
function slideTo(target, duration){ // credit to Mahieddine Abdelkader & Ludwig Wendzich for original ideas. | |
var to = isNaN(target) ? $(target).offset().top : target, //find scroll to position | |
from = $(window).scrollTop() //find starting point | |
dy = to-from, //calculate change in scroll position - deltaY | |
body = $("body"), // TODO: better to have it outside of local scope already rather than fetching it every time... | |
duration = isNaN(duration) ? 500 : duration; | |
// We're going to use translate-y to move the the page so it feels like we're at the *from* scroll position, when we're actually instantly at the *to* scroll position. */ |
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
function querystring(key) { | |
var re=new RegExp('(?:\\?|&)'+key+'=(.*?)(?=&|$)','gi'); | |
var r=[], m; | |
while ((m=re.exec(document.location.search)) != null) r.push(m[1]); | |
return r; | |
} |
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
module.exports = function(grunt) { | |
// Load all of our NPM tasks... | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-cssmin'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-stylus'); |
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><!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--><!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--><!--[if IE 8]><html class="no-js lt-ie9"><![endif]--><!--[if gt IE 8]><!--> | |
<html class="no-js" lang="en"><!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> | |
<title>Example Jade Template</title> | |
<script src="/_assets/js/modernizr-2.6.2.min.js"></script> | |
</head> | |
<body> | |
<h1>Example Jade Template</h1> |
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
14:13:10 ⑆ [sdaniel@sim-vmlmac] | |
~/Code/gcom-static/trunk | |
svn [✓] | |
λ cp -vf htdocs/_assets/css/*.css ~/Code/gcom/trunk/src/gcom/_assets/css/ | |
λ cp -vf htdocs/_assets/js/*.js ~/Code/gcom/trunk/src/gcom/_assets/js/ | |
λ svn export htdocs/_assets/images/ ~/Code/gcomimages/ | |
λ cp -rvf ~/Code/gcomimages/ ~/Code/gcom/trunk/src/gcom/_assets/images/ | |
λ svn export htdocs/science-of-g/_assets/ ~/Code/sogAssets/ | |
λ cp -rvf ~/Code/sogAssets/ ~/Code/gcom/trunk/src/gcom/science-of-g/_assets/ |
OlderNewer