- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
========================= | |
# /etc/nginx/nginx.conf | |
========================= | |
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; |
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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<input id="file" type="file" accept="image/*" /> | |
<br/> | |
<h2>As read:</h2> | |
<img id="placeholder1" width=300/><br/> | |
<h2>Rotated by exif data:</h2> | |
<img id="placeholder2" width=300/> | |
<script> |
Lately I need to use CiteSeerX dataset in my research, and I've been following the instructions [on this blog][1].
Sadly, due to the update of OAIHarvester, that is not working anymore. Here is my version that works.
-
Download [OAIHarvester2][2] from oclc.org, the latest version is 2-0.1.12 when I write this.
-
Run such command to download full CiteSeerX dataset:
java -classpath .:harvester2.jar:log4j-1.2.12.jar:xalan.jar:xercesImpl.jar:xml-apis.jar ORG.oclc.oai.harvester2.app.RawWrite -out citeseerx_alldata.xml http://citeseerx.ist.psu.edu/oai2
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
// Pipe to ffmpeg with something like: | |
// node draw.js | ffmpeg -y -c:v png -f image2pipe -r 20 -i - -an -c:v libx264 -pix_fmt yuv420p -movflags +faststart myvideo.mp4 | |
var Canvas = require("canvas"), | |
d3 = require("d3"), | |
topojson = require("topojson"), | |
rw = require("rw"), | |
world = require("./world-110m.json"); | |
var width = 1280, |
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
// Fourier Transform Module used by DFT, FFT, RFFT | |
function FourierTransform(bufferSize, sampleRate) { | |
this.bufferSize = bufferSize; | |
this.sampleRate = sampleRate; | |
this.bandwidth = 2 / bufferSize * sampleRate / 2; | |
this.spectrum = new Float64Array(bufferSize/2); | |
this.real = new Float64Array(bufferSize); | |
this.imag = new Float64Array(bufferSize); |
Converting an SVG animation to a video with the MediaRecorder API and a hidden canvas.
Drawing frames from img
elements can introduce an extra delay, so this version generates all the frames upfront and then renders them in a loop with requestAnimationFrame()
.
See also: Canvas animation to video
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
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:uuid="http://www.uuid.org" version="2.0"> | |
<xsl:output method="xml" encoding="UTF-8"/> | |
<xsl:template match="/"> | |
<Payment xmlns="http://ws.apache.org/ns/synapse"> | |
<xsl:for-each select="//Order/lunch"> | |
<discount> | |
<li> | |
<xsl:attribute name="uid" select="uuid:get-uuid(drinkName)"/> | |
<xsl:value-of select="drinkName"/> | |
<span> |
OlderNewer