This file contains hidden or 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 python | |
| from __future__ import with_statement # needed for python 2.5 | |
| from fabric.api import * | |
| from fabric.contrib.console import confirm | |
| from fabric.contrib import files | |
| USAGE = """ | |
| ================================================================ | |
| NOTE: | |
| using this fabfile expects that you have the python utility |
This file contains hidden or 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
| # Setup dir and repo | |
| mkdir underscore-string | |
| cd underscore-string | |
| git init | |
| # Make some files we'll need | |
| touch README.md package.js smart.json | |
| # Add the submodule and checkout the desired branch | |
| git submodule add git://github.com/epeli/underscore.string.git lib/underscore.string |
This file contains hidden or 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
| def add(*numbers) | |
| numbers.inject(0) {|sum, number| sum += number} | |
| end | |
| def subtract(*numbers) | |
| numbers.inject {|result, number| result -= number} | |
| end | |
| def calculate(*args) | |
| options = {'add'=>true} |
This file contains hidden or 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
| http://7enn.com/2011/03/13/running-rake-automatically-when-rb-file-changes/ | |
| https://brendaneich.com/2012/10/harmony-of-dreams-come-true/ | |
| http://dailyjs.com/2012/10/15/preparing-for-esnext/ | |
| http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts | |
| http://www.technicalypto.com/2010/04/trie-in-java.html | |
| http://openmymind.net/mongodb.pdf | |
| http://www.public.asu.edu/~fmorstat/paperpdfs/icwsm2013.pdf | |
| http://www.10gen.com/presentations/mongodb-melbourne-2012/schema-design-example | |
| http://gun.io/blog/Building-Backbone.js-apps-with-Backlift-part-2-Collections-and-Forms/ |
This file contains hidden or 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 () { | |
| App.Views.PopoverView = Backbone.View.extend({ | |
| initialize: function (options) { | |
| _.bindAll(this, "render", "setContent", "show", "hide", "toggle", "destroy", "remove"); | |
| this.offsetTop = 30; | |
| this.offsetLeft = 0; |
This file contains hidden or 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() { | |
| var api = {}, | |
| $response = $('#response'); | |
| $('#ajaxForm').on('submit', function(e) { | |
| e.preventDefault(); | |
| var search = $('#title').val(); | |
| $response.empty().addClass('loading'); | |
| if (!api[search]) { | |
| api[search] = $.ajax({ |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Swimlane using d3.js</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
| <script type="text/javascript" src="randomData.js"></script> | |
| <style> | |
| .chart { | |
| shape-rendering: crispEdges; | |
| } |
This file contains hidden or 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
| This is a method to using your Ubuntu 12.04 server without the Unity desktop on a very fast remote desktop program. This is by far the best method to managing your Ubuntu server if you like GUI. | |
| apt-get install --no-install-recommends ubuntu-desktop | |
| apt-get --yes purge unity unity-2d unity-2d-places unity-2d-panel unity-2d-spread | |
| apt-get --yes purge unity-asset-pool unity-services unity-lens-* unity-scope-* | |
| apt-get --yes purge liboverlay-scrollbar* | |
| apt-get --yes purge appmenu-gtk appmenu-gtk3 appmenu-qt | |
| apt-get --yes purge firefox-globalmenu thunderbird-globalmenu | |
| apt-get --yes purge unity-2d-common unity-common | |
| apt-get --yes purge libunity-misc4 libunity-core-5* |
This file contains hidden or 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
| events: { | |
| 'click body': 'onClickBody' | |
| }, | |
| onClickBody: function(){ | |
| console.log('click'); | |
| }, | |
| render: function(){ | |
| this.template(); |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title> Tests </title> | |
| <link rel="stylesheet" href="./test/node_modules/mocha/mocha.css" /> | |
| </head> | |
| <body> | |
| <div id="mocha"></div> | |
| <script src="./test/node_modules/mocha/mocha.js"></script> | |
| <script src="./test/node_modules/chai/chai.js"></script> | |
| <script> |
OlderNewer