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
// Exercise 1 | |
//============== | |
// Refactor to remove all arguments by partially applying the function | |
var words = function(str) { | |
return _.split(' ', str); | |
}; | |
var match = R.curry(function(what, x) { | |
return x.match(what); |
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
/*********************************************************/ | |
// Exercise: Readers | |
// https://tour.golang.org/methods/11 | |
package main | |
import "code.google.com/p/go-tour/reader" | |
type MyReader struct{} |
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 fs = require('fs'); | |
Int64 = require('node-int64'); | |
var varint = require('varint'); | |
var lazy = require("lazy"); | |
// http://braindrivendevelopment.com/2013/10/31/reading-a-file-in-node-js/ | |
// http://lucene.apache.org/core/3_0_3/fileformats.pdf | |
var bufferSegmentGen = fs.readFileSync('./segments.gen'); | |
var bufferSegments = fs.readFileSync('./segments_4o4'); |
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
/* | |
GITHUB MARKDOWN EXTRACTOR RULES | |
https://guides.github.com/features/mastering-markdown/ | |
http://www.table-ascii.com/ | |
http://www.loc.gov/marc/specifications/specchartables.html | |
http://www.utf8-chartable.de/unicode-utf8-table.pl |
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
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
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 WIDTH, HEIGHT, canvas, con, g; | |
var pxs = []; | |
var rint = 50; | |
$(document).ready(function() { | |
$('.get-year').text(new Date().getFullYear()); | |
var $clones = $(".testimonial-list li").clone().sort(function() { | |
return 0.5 - Math.random(); | |
}).slice(0, 4).removeClass("hidden"); | |
$(".testimonial-list").empty().append($clones); | |
var windowSize = function() { |
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
* Empty cache | |
npm cache clean | |
* Uninstall module | |
npm uninstall [module_name] | |
* Install module version | |
npm install [module_name]@[version] |
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
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |
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
angular.module('myApp') | |
.run(['$rootScope', function ($rootScope) { | |
window.i18n.init(options, function () { | |
// When finished loading translations, trigger re-evaluation of views for translations | |
$rootScope.$digest(); | |
}); | |
}]) | |
.filter('translate', [function(){ | |
return function(key, params) { | |
// i18next needs time to initialize (loading translations). In this phase translation does not work |
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
follow instructions here first: | |
http://sickbeard.com/install.html | |
then | |
mv my-sickbeard-install/ .sickbeard | |
sudo mv .sickbeard/init.ubuntu /etc/init.d/sickbeard | |
sudo gedit /etc/init.d/sickbeard |