Skip to content

Instantly share code, notes, and snippets.

@zdwolfe
zdwolfe / gist:6721115
Last active October 1, 2018 06:38
Basic nginx configuration for AngularJS html5Mode
server {
listen 0.0.0.0:12345;
location / {
root /home/zdwolfe/src/angularAWS/app;
try_files $uri $uri/ /index.html =404;
}
}
@zdwolfe
zdwolfe / gist:6690401
Created September 24, 2013 20:00
LibreCMS Model Construction
[
{
"model": "User",
"type": [String],
"username": String,
"courses": [Course],
"authentication": {
"pasword": SHAEncodedString,
"accessTokens": [String]
}
var fs = require('fs');
var readability = require('readability');
var html = fs.readFileSync('test.html', 'utf-8');
// This is an very early example. The API is subject to change.
readability.parse(html, 'http://www.cnn.com/2013/08/01/politics/congress-work-time/index.html?hpt=hp_t1', function(result) {
console.log(JSON.stringify(result, null, 4));
});
tmp node tmp.js
3 Aug 13:05:57 - ---DOM created
3 Aug 13:05:57 - 0 seconds [Remove all stylesheets]
3 Aug 13:05:57 - 0 seconds [Turn all double br's into p's]
3 Aug 13:05:57 - 0.007 seconds [prepDocument]
3 Aug 13:05:57 - 0.712 seconds [grabArticle nodePrepping]
3 Aug 13:05:57 - 0.01 seconds [grabArticle calculate scores]
3 Aug 13:05:57 - 0.022 seconds [grabArticle find top candidate]
3 Aug 13:05:57 - 0.015 seconds [grabArticle look through its siblings]
3 Aug 13:05:57 - 0.002 seconds [cleanConditionally]
ncaught Error: Attempted to handle event `willSetProperty` on <Travis.Build:ember3526:5882247> while in state rootState.loaded.reloading. Called with {reference: [object Object], store: <Travis.Store:ember464>, name: _duration}
<?php echo '<p>Hello World</p>'; ?>
@zdwolfe
zdwolfe / gist:5204460
Created March 20, 2013 13:01
Log of example Reddit Passport Strategy
127.0.0.1 - - [Wed, 20 Mar 2013 13:00:27 GMT] "GET /login HTTP/1.1" 200 45 "http://127.0.0.1:3000/login" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Ubuntu Chromium/24.0.1312.56 Chrome/24.0.1312.56 Safari/537.17"
127.0.0.1 - - [Wed, 20 Mar 2013 13:00:27 GMT] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Ubuntu Chromium/24.0.1312.56 Chrome/24.0.1312.56 Safari/537.17"
127.0.0.1 - - [Wed, 20 Mar 2013 13:00:30 GMT] "GET /account HTTP/1.1" 302 68 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Ubuntu Chromium/24.0.1312.56 Chrome/24.0.1312.56 Safari/537.17"
127.0.0.1 - - [Wed, 20 Mar 2013 13:00:30 GMT] "GET /login HTTP/1.1" 200 45 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Ubuntu Chromium/24.0.1312.56 Chrome/24.0.1312.56 Safari/537.17"
127.0.0.1 - - [Wed, 20 Mar 2013 13:00:30 GMT] "GET /favicon.ico HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTM
[
{
"name": "foo",
"number": "bar",
"errors": [3, 5]
},
{
"name": "foo2",
"number": "bar2",
"errors": [1, 2]
% Zachary Wolfe
% [email protected]
% CMPSC 456 SPR 2013
function [aQR, rQR, aMGS, rMGS, aCHOL, rCHOL] = fit()
t = 0:0.05:1;
V = vander(t);
X = V(:,17:21);
b = sin(pi*t);
b = b'; % make b a column vector
/home/zach/src/Event-Playlist/node_modules/imagemagick/imagemagick.js:126
prop[comps[0].trim().toLowerCase()] = comps[1].trim()
^
TypeError: Cannot set property '22' of undefined
at parseIdentify (/home/zach/src/Event-Playlist/node_modules/imagemagick/imagemagick.js:126:45)
at null.callback (/home/zach/src/Event-Playlist/node_modules/imagemagick/imagemagick.js:155:18)
at Accumulator.finish (/home/zach/src/Event-Playlist/node_modules/imagemagick/imagemagick.js:60:55)
at ChildProcess.<anonymous> (/home/zach/src/Event-Playlist/node_modules/imagemagick/imagemagick.js:86:11)
at ChildProcess.EventEmitter.emit (events.js:99:17)