Go to the egghead website, i.e. Building a React.js App
run
var links = $('h4 a').get().map(function(a){ return a.href}).join('\n')
copy(links)
vcl 4.0; | |
acl purgers { | |
"localhost"; | |
"127.0.0.1"; | |
"192.168.199.0"/24; | |
} | |
backend default { | |
.host = "localhost"; |
ffmpeg -i "17 Audio Track.aiff" -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 17.mp3 |
Go to the egghead website, i.e. Building a React.js App
run
var links = $('h4 a').get().map(function(a){ return a.href}).join('\n')
copy(links)
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
dt = difftool | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen%cr %C(bold blue)<%an>%Creset' | |
lp = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen%cr %C(bold blue)<%an>%Creset' | |
ca = commit -a | |
[color] | |
ui = auto |
console.time("Array.push"); | |
const array = []; | |
for (var i = 0; i < 1e7; i++) array[i] = i; | |
console.timeEnd("Array.push"); | |
console.time("new Array.push"); | |
const array1 = new Array(1e7); | |
for (var i = 0; i < 1e7; i++) array1[i] = i; | |
console.timeEnd("new Array.push"); |
#!/usr/bin/env node | |
const files = process.argv.slice(2) | |
const cmds = files.map(f => | |
`ffmpeg -i ${f} -filter:v "setpts=PTS/30" -crf 20 -r 30 -an -threads 1 -y -vcodec libx264 ${f}.collapse.flv`) | |
console.log(cmds.join('\n')) |
import generate from "@babel/generator"; | |
import {parse} from "@babel/parser"; | |
import traverse from "@babel/traverse"; | |
import {identifier, isIdentifier, isMemberExpression, memberExpression} from "@babel/types"; | |
import * as fs from 'fs' | |
const file = process.argv[2] | |
const ast = parse(fs.readFileSync(file, 'utf-8’)) // 解析得到 ast | |
traverse(ast, { | |
CallExpression(path) { // 当遍历到“调用表达式”时进入此回调 | |
if (isMemberExpression(path.node.callee) && // 被调用的函数来自一个成员表达 |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
use std::hash::{Hash, Hasher}; | |
use swc_common::{FileName, SourceMap}; | |
use swc_common::input::StringInput; | |
use swc_common::sync::Lrc; | |
use std::borrow::Borrow; | |
fn main() { | |
let cm: Lrc<SourceMap> = Default::default(); | |
let fm = cm |