Skip to content

Instantly share code, notes, and snippets.

Invading spaces

Nathan Friedly nfriedly

Invading spaces
View GitHub Profile
nfriedly / index.js
Created May 7, 2015
streaming opus decoder
View index.js
var fs = require('fs');
var watson = require('watson-developer-cloud');
var ogg = require('ogg');
var opus = require('./opus_stream.js');
var wav = require('wav');
var Speaker = require('speaker');
var oggDecoder = new ogg.Decoder();
nfriedly / log.txt
Created Oct 17, 2014
MiniCMS error
View log.txt
info: Welcome to DocPad v6.69.1 (local installation: c:\Users\IBM_ADMIN\watson-developer-cloud\node_modules\docpad)
notice: If everyone who saw this message donated $1/week, maintaining DocPad would become sustainable:
info: Contribute:
info: Plugins: eco, minicms, mongodb
info: Environment: development
info: Watching setup starting...
info: Watching setup
error: An error occured:
Error: The task [action runner ➞ watch] just completed, but it had already completed earlier, this is unexpected. State information is:
{ error:
View jsbin.ihiHIpo.html
<!DOCTYPE html>
<meta charset=utf-8 />
<title>JS Bin</title>
<p>Goal: <img src="" style="max-width: 100%" /> </p>
<div id="popup"></div>
nfriedly / testcode.js
Created Sep 22, 2012
JSHint ignores the `indent:` option hwen it's passed in globally
View testcode.js
// contrived example. This file uses 3 spaces for indentation
function doStuff() {
nfriedly / ddg-google-da.xml
Created May 6, 2012
DDGG: Duck Duck Go + Google Suggest in Danish
View ddg-google-da.xml
<?xml version="1.0"?>
<OpenSearchDescription xmlns="">
<ShortName>Duck Duck Go + Google Suggest</ShortName>
<Description>Duck Duck Go + Google Suggest</Description>
<Image height="16" width="16" type="image/x-icon"></Image>
<Url type="text/html" method="get" template="{searchTerms}"/>
<Url type="application/x-suggestions+json" template=";q={searchTerms}&amp;hl=da"/>
<Url rel="suggestions" type="application/x-suggestions+xml" template="{searchTerms}&amp;client=ie8&amp;mw={ie:maxWidth}&amp;sh={ie:sectionHeight}&amp;rh={ie:rowHeight}&amp;inputencoding={inputEncoding}&amp;outputencoding={outputEncoding}&amp;hl=da" />
nfriedly /
Created Apr 4, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
nfriedly / fb_graph_aip_results.js
Created Jan 19, 2012
FB Graph API: ?ids=username,pagename&fields=name,picture looses picture field for page
View fb_graph_aip_results.js
// If you ask for a username before a pagename in the ?ids= Graph API,
// it looses the picture field for all pages.
// A few examples:
//,name works correctly:
"nfriedly": {
"name": "Nathan Friedly",
"id": "215902661",
nfriedly / all_fixed.js
Created Jan 10, 2012
FB long graph query fix
View all_fixed.js
FB.ApiServer.flash = function(b, e, c, d, a){
if (!window.FB_OnXdHttpResult) window.FB_OnXdHttpResult = function(g, f) {
FB.Flash.onReady(function() {
if (b === 'graph') d.suppress_http_code = 1;
var h = FB.getDomain(b) + e,
f = FB.QS.encode(d);
if (c === 'get') {
if (h.length + f.length > 2000) {