Skip to content

Instantly share code, notes, and snippets.

View temberature's full-sized avatar

Tong temberature

  • USA
View GitHub Profile
@temberature
temberature / vscode settings.json
Created November 19, 2018 10:24
vscode settings.json
{
"workbench.colorTheme": "One Dark Pro",
"materialTheme.fixIconsRunning": false,
"workbench.iconTheme": "vscode-icons",
"editor.foldingStrategy": "indentation",
"git.autofetch": true,
"workbench.editor.enablePreviewFromQuickOpen": false,
"window.zoomLevel": 0,
"diffEditor.ignoreTrimWhitespace": true,
"gitlens.hovers.currentLine.over": "line",
var nodes = document.querySelectorAll('[is]')
Array.from(nodes).reduce((times, node) => {
var type = node.getAttribute('is')
if (!times[type]) {
times[type] = 1
} else {
times[type] ++
}
return times
{
"workbench.colorTheme": "One Dark Pro",
"workbench.iconTheme": "vscode-icons",
"editor.foldingStrategy": "indentation",
"git.autofetch": true,
"workbench.editor.enablePreviewFromQuickOpen": false,
"window.zoomLevel": 0,
"diffEditor.ignoreTrimWhitespace": true,
"gitlens.hovers.currentLine.over": "line",
"eslint.validate": ["javascript", "javascriptreact", "vue"],
var a = function(){console.log('原始');}
console.log(a, a())
var b = eval('(' + a.toString().replace('(){', '(){console.log("开头");').replace('}', 'console.log("结尾");}') + ')')
console.log(b, b())
#!/bin/sh
# bash tut: http://linuxconfig.org/bash-scripting-tutorial
# Linux PDF,OCR: http://blog.konradvoelkel.de/2013/03/scan-to-pdfa/
y="$(pwd)/$1"
echo Will create a searchable PDF for $y
x="$(basename "$y")"
name=${x%.*}
var fs = require('fs');
var path = require('path');
var OpenCC = require('opencc');
// Load the default Simplified to Traditional config
var opencc = new OpenCC('t2s.json');
// Sync API
var converted = opencc.convertSync("漢字");
console.log(converted);
@temberature
temberature / index.html
Created March 21, 2019 12:43
ffmpeg wasm
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
{
"id": "8f1a9f7f-64b6-4c43-9bd5-948101d055fc",
"name": "New Project",
"aspectRatio": "16:9",
"markers": [],
"version": 10,
"schemaVersion": 8,
"shouldCloudSync": false,
"createdAt": "2019-03-12T03:59:16.662Z",
"updatedAt": "2019-03-28T07:41:16.659Z",
{
"local": [
{
"asset_path": null,
"name": null,
"asset_size": 19932335,
"tags": [],
"created_at": "2019-03-28T07:55:27.049620",
"updated_at": "2019-03-28T07:55:27.049628",
"s3_bucket_name": null,
{
"name": "New Project",
"lastSyncedAt": "2019-03-28T07:51:57.386Z",
"markers": [],
"tracks": [],
"version": 13,
"shouldCloudSync": false,
"updatedAt": "2019-03-28T07:55:23.935Z",
"schemaVersion": 8,
"aspectRatio": "16:9",