Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/usr/bin/env ruby | |
| # import am DNS zone file into Hover | |
| # | |
| # first get your domain ID from here: | |
| # https://www.hover.com/api/domains/yourdomain.com/dns/ | |
| # | |
| # install the required gems: | |
| # | |
| # gem install hover dns-zone |
| import React, { useState, useEffect } from "react"; | |
| import axios from "axios"; | |
| const App = () => { | |
| const [username, setUsername] = useState(""); | |
| const [password, setPassword] = useState(""); | |
| const [user, setUser] = useState(); | |
| useEffect(() => { | |
| const loggedInUser = localStorage.getItem("user"); |
| <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> |
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
| // 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); |
| // 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, |
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
| <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> |
| ========================= | |
| # /etc/nginx/nginx.conf | |
| ========================= | |
| user www-data; | |
| worker_processes 4; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 768; |