Goal: make computers talk like human.
My notes from audio (voice + speech) AI research started in 2023.
# Used on Ubuntu 18.04 and 20.04 | |
# Find instructions for other OSes here: https://certbot.eff.org/instructions | |
# Install Certbot via Snaps | |
sudo snap install core; sudo snap refresh core | |
sudo snap install --classic certbot | |
sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
# Install DNS CloudFlare plugin | |
sudo snap set certbot trust-plugin-with-root=ok |
"use strict" | |
const express = require('express') | |
const graphqlHTTP = require('express-graphql') | |
const { parse, print, visit, parseValue, printSchema, buildSchema } = require('graphql') | |
const app = express() | |
const util = require('util') | |
const graphqlTools = require('graphql-tools'); | |
const rawSchema =` |
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
try { | |
eval(str); | |
} catch(e) { | |
alert('Your browser does not support ES6!') | |
} |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
#!/bin/bash | |
set -e | |
export LC_ALL=C | |
TS=$( date --utc '+%Y-%m-%dT%H:%M:%SZ' ) | |
BACKUP_DIR="/data/backup/${TS}" | |
docker run -it --rm --link mongodb:mongodb -v /data/mongodb:/data dockerfile/mongodb bash -c 'mongodump --out '${BACKUP_DIR}' --host $MONGODB_PORT_27017_TCP_ADDR' |
Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
/* ---------------------------------------------------------- */ | |
/* */ | |
/* A media query that captures: */ | |
/* */ | |
/* - Retina iOS devices */ | |
/* - Retina Macs running Safari */ | |
/* - High DPI Windows PCs running IE 8 and above */ | |
/* - Low DPI Windows PCs running IE, zoomed in */ | |
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
/* - Android hdpi devices and above */ |
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |