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
namespace :js do | |
require 'sprockets' | |
environment = Sprockets::Environment.new(File.dirname(__FILE__)) | |
environment.append_path 'src/bower' | |
environment.append_path 'src/coffee' | |
source_code = environment['app.coffee'] | |
desc 'compile CoffeeScript with Sprockets' | |
task :compile do |
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
%ng-form(name="circleEditForm") | |
%label Circle Name: | |
%input(type="text" name="circleName" | | |
ng-minlength= 3 | | |
ng-model="circleModal.name" | | |
ng-maxlength= 8 | | |
maxlength= 8 | | |
required | | |
ng-class="{error: !circleEditForm.circleName.$valid}" ) |
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
# = require '../components/jquery/jquery' | |
# = require '../components/angular-complete/angular' | |
Controllers = angular.module 'controllers', [] | |
Controllers.controller 'PhoneListCtrl', ['$scope', ($scope)-> | |
$scope.phones = [ | |
{name: "Nexus S", snippet: "Fast just got faster with Nexus S."}, |
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
var evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; }); | |
console.log(evens); |
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
var App = angular.module('App', []); |
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
var App = angular.module('App', []); | |
App.controller('TodoCtrl', function($scope, $http) { | |
$http.get('todos.json') | |
.then(function(res){ | |
$scope.todos = res.data; | |
}); | |
}); |
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
var appendStyle = function(){ | |
var htmlstr = '<link rel="stylesheet" '+ | |
'href="https://gist.github.com/stylesheets/gist/embed.css" '+ | |
'type="text/css" />'; | |
$('head').append( htmlstr ); | |
} | |
/* | |
look for tags [gist]#######[/gist] and for each one found, insert a | |
div with an id attribute that references the gist's id |
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 drawVisualization() { | |
var col1 = ["AP","AP-PAN","ARENA","CD","CD-PNL","CDU","CDU-FMLN","CDU-PSD","FC","FDR","FDR-CD","FDR-PDC","FDR-PDC-CD","FMLN","FMLN-CD","FMLN-PDC","FMLN-PSD","PAN","PCN","PDC","PDC-FMLN","PDC-FMLN-CD","PDC-PMR-PSD","PDC-PSD","PMR","PMR-PDC","PMR-PDC-PSD-CDU","PMR-PSD","PMR-PSD-CDU","PNL","PPR","PSD"]; | |
var col2 = ["AP","AP-PAN","ARENA","CD","CD-PNL","CDU","CDU-FMLN","CDU-PSD","FC","FDR","FDR-CD","FDR-PDC","FDR-PDC-CD","FMLN","FMLN-CD","FMLN-PDC","FMLN-PSD","PAN","PCN","PDC","PDC-FMLN","PDC-FMLN-CD","PDC-PMR-PSD","PDC-PSD","PMR","PMR-PDC","PMR-PDC-PSD-CDU","PMR-PSD","PMR-PSD-CDU","PNL","PPR","PSD"]; | |
var table1 = [["2003",11990,374,491452,0,0,37629,84995,123,10208,0,0,0,0,471042,0,19739,259,11416,210056,104494,0,0,13105,592,26447,4101,2493,3104,374,0,20419,7773],["2006",0,0,791811,30778,24101,0,0,0,0,0,0,0,0,670711,106314,0,0,0,307330,173982,12192,0,0,0,0,0,0,0,0,2637,0,0],["2009",0,0,867273,25204,0,0,0,0,0,20962,6450,5020,1689,886161,237119,0,0,0,235989,185844,8755,7811,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
m0101 Ahuachapán | |
m0102 Apaneca | |
m0103 Atiquizaya | |
m0104 Concepción de Ataco | |
m0105 El Refugio | |
m0106 Guaymango | |
m0107 Jujutla | |
m0108 San Francisco Menéndez | |
m0109 San Lorenzo | |
m0110 San Pedro Puxtla |
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
(defn fib [n] | |
(Math/round (/ (- (Math/pow 1.618034 n) | |
(Math/pow (- 0.618034) n)) | |
(Math/sqrt 5)))) | |
(map fib (range 51)) | |
;; (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524579 5702888 9227467 14930356 24157823 39088179 63246003 102334183 165580188 267914374 433494567 701408948 1134903525 1836312490 2971216044 4807528580 7778744699 12586273401) |