I screw around with ffmpeg a lot, here are some recipies which I frequently use.
You need 4 variables:
- W - Width of Output Video
- H - Height of Output Video
//login query example | |
app.post("/verify", (request, response) => { | |
const req=request.body | |
var output={} | |
try | |
{ | |
var info = jwt.verify(req.token, privateKey, { algorithm: 'HS512' }); | |
output["verified"]=1; | |
}catch(err) | |
{ |
node_modules | |
dist/ | |
yarn.lock | |
wwwroot |
/** | |
* Partial polyfill for Proxy. For details, see https://gist.github.com/mailmindlin/640e9d707ae3bd666d70 | |
*/ | |
function Proxy (target, handler, revocable) { | |
var self = this;//because life | |
//override Object.prototype properties | |
Object.defineProperty(this, '__lookupGetter__', {value: target.__lookupSetter__.bind(target)}); | |
Object.defineProperty(this, '__lookupSetter__', {value: target.__lookupSetter__.bind(target)}); | |
Object.defineProperty(this, '__defineGetter__', {value: target.__defineGetter__.bind(target)}); | |
Object.defineProperty(this, '__defineSetter__', {value: target.__defineSetter__.bind(target)}); |
Animating star field
A Pen by Graeme Fulton on CodePen.
/* | |
* Export selection to SVG - export_selection_as_SVG | |
* (Adapted from Layers to SVG 0.1 - export_selection_as_SVG.jsx, by Rhys van der Waerden) | |
* | |
* @author SebCorbin | |
*/ | |
// Variables | |
var ignoreHidden = true, | |
svgExportOptions = (function () { |
From: http://run-node.com/littlest-database-that-could/
I've written numerous tiny databases. They don't have much features, but they don't need much features. Usually I'm looking for fast simple key/value stores and Node never disappoints. The point here is, why abstract key value store when JS gives us one for free, as it's most basic component: object.
Will it meet every need? No. But it will meet ALOT of scenarios.
In memory JS object lookups, were talking hundreds of thousands of lookups (you'll easily flood http before the db), and save hundreds of thousands of records in a JSON file written to disk. Not a 200ms r/t to some hosted Redis. Hey, that's fine if that's your thing.
Here's the requirements:
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace RADECtoALTAZ |