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
#!/bin/bash | |
set -o nounset | |
set -o errexit | |
HOST="example.com" | |
PORT=8080 | |
if [ $1 == "on" ]; then | |
eval `export http_proxy=http://$HOST:$PORT` | |
eval `npm config set proxy http://$HOST:$PORT` | |
eval `git config --global http.proxy http://$HOST:$PORT` | |
echo Proxy Set |
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
/** | |
* Kevin Coughlin <[email protected]> | |
*/ | |
(function () { | |
'use strict'; | |
WinJS.Namespace.define("Converters", { | |
/** | |
* Convert current time and duration to human | |
* readable 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
Programming basics: | |
- How to Think Like A Computer Scientist - http://www.greenteapress.com/thinkpython/thinkpython.html | |
- Think Complexity - http://greenteapress.com/complexity/thinkcomplexity.pdf | |
- SICP - http://mitpress.mit.edu/sicp/ | |
--- | |
Web/Development basics: | |
- Team Treehouse modules on git, shell commands, DNS, etc -http://teamtreehouse.com | |
- How Does The Internet Work? - http://www.stanford.edu/class/msande91si/www-spr04/readings/... | |
- Udacity Web Dev course - https://www.udacity.com/course/cs253 | |
--- |
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
/* jslint node: true */ | |
'use strict'; | |
var FeedParser = require('feedparser'); | |
var request = require('request'); | |
var url = 'http://smodcast.com/channels/smodcast/feed'; | |
var options = {}; | |
var req = request(url); | |
var feedparser = new FeedParser(options); |
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 () { | |
"use strict"; | |
/** | |
* Tumblr OAuth Client | |
*/ | |
WinJS.Namespace.define('TumblrOAuth', { | |
client: WinJS.Class.define(function (consumerKey, consumerSecret) { | |
this._consumerKey = consumerKey; | |
this._consumerSecret = consumerSecret; |
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
Build 3080 | |
Release Date: 24 March 2015 | |
See also the Blog Post | |
Fixed Redo sometimes restoring the selection to the incorrect location | |
Reworked how Build Systems are selected (More Information) | |
Build Systems may now declare "keyfiles" (e.g., 'Makefile' for the Make build system) to better auto detect which build system to use | |
Improved handling of build systems that generate lots of output | |
New windows always use the automatic build system, rather than the build system of the last used window | |
Command Palette now remembers the last entered string | |
Improved change detection for files that disappear and reappear, as happens with disconnected network drives |
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() { | |
'use strict'; | |
var session = null; | |
var episodeUrl = 'http://ec.libsyn.com/p/9/2/2/92263366ea06064d/p635.mp3?d13a76d516d9dec20c3d276ce028ed5089ab1ce3dae902ea1d06ca8e32d1cd58c77c&c_id=8791174'; | |
var currentMedia = null; | |
window['__onGCastApiAvailable'] = function(loaded, errorInfo) { | |
if (loaded) { | |
initializeCastApi(); |
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 abstract class InfiniteRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
public final static String TAG = InfiniteRecyclerOnScrollListener.class.getSimpleName(); | |
private int previousTotal = 0; | |
private boolean loading = true; | |
private int current_page = 0; | |
private final LinearLayoutManager mLinearLayoutManager; | |
public InfiniteRecyclerOnScrollListener(LinearLayoutManager linearLayoutManager) { | |
this.mLinearLayoutManager = linearLayoutManager; |
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 tumblr = require('tumblr.js'); | |
var client = tumblr.createClient({ consumer_key: /* your consumer key */ }); | |
client.posts('annetje-stichting', { id: 119348740950 }, function (err, data) { | |
console.log(data); | |
/** | |
* Example output: | |
* ... | |
* note_count: 0, | |
* caption: '<h2>helping kids in tough times</h2><p>lorem ipsumlorem ipsumlorem ips |
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 input = ['Jag talar Rövarspråket!', 'I\'m speaking Robber\'s language!']; | |
function rovarsprakify(str) { | |
var result = []; | |
for (var c of str) { | |
var newChar = (isVowel(c) || !isAlpha(c)) ? c : c + 'o' + c.toLowerCase(); | |
result.push(newChar); | |
} | |
return result.join(''); | |
} |