Skip to content

Instantly share code, notes, and snippets.

View cjfff's full-sized avatar
🎯
Focusing

JingFeng Chen cjfff

🎯
Focusing
View GitHub Profile
{
"meta": {
"theme": "short"
},
"basics": {
"name": "Chen JingFeng",
"label": "Web Developer",
"summary": "I'm a frontend developer with 5 years of frontend experience, currently focused on the React technology stack, with extensive experience in large-scale B2B frontend architecture and Node.js service development. Pursuing the best coding practices.",
"website": "",
"email": "cjfff@gmail.com",
@cjfff
cjfff / timeout-confirm
Created October 8, 2021 06:48
a extention of the inquirer
// eslint-disable-next-line @typescript-eslint/no-var-requires
const chalk = require('chalk')
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ConfirmPrompt = require('inquirer/lib/prompts/confirm')
class TimeoutConfirmPrompt extends ConfirmPrompt {
constructor(...args) {
super(...args)
this.opt.timeoutTips = this.opt.timeoutTips || ((t) => `(${t}s)`)
this.opt.timeout = this.opt.timeout || 10
@cjfff
cjfff / cloudSettings
Last active August 7, 2021 17:58
cloudSettings
{"lastUpload":"2021-08-07T17:57:59.648Z","extensionVersion":"v3.4.3"}
@cjfff
cjfff / getMP4Length.js
Created July 22, 2020 23:59 — forked from Elements-/getMP4Length.js
Read the duration of a mp4 file nodejs
var buff = new Buffer(100);
fs.open(file, 'r', function(err, fd) {
fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) {
var start = buffer.indexOf(new Buffer('mvhd')) + 17;
var timeScale = buffer.readUInt32BE(start, 4);
var duration = buffer.readUInt32BE(start + 4, 4);
var movieLength = Math.floor(duration/timeScale);
console.log('time scale: ' + timeScale);
console.log('duration: ' + duration);
{"version":1,"resource":"file:///Users/joyy/Project/oneship-h5/src/containers/Order/Detail/index.tsx","entries":[{"id":"CIyY.tsx","timestamp":1650961506385},{"id":"ugCg.tsx","timestamp":1650973908866},{"id":"EDkI.tsx","timestamp":1650974260518},{"id":"IG8L.tsx","timestamp":1650974273054},{"id":"ciqt.tsx","timestamp":1650974294426},{"id":"dppA.tsx","timestamp":1650975002205},{"id":"Icxd.tsx","timestamp":1650975023017},{"id":"Fq8u.tsx","timestamp":1650978360697},{"id":"aOJZ.tsx","timestamp":1650979486854},{"id":"1WMf.tsx","timestamp":1650979505430},{"id":"thjD.tsx","timestamp":1650979971254},{"id":"gA4b.tsx","timestamp":1651028685128},{"id":"MVUm.tsx","timestamp":1651028706925},{"id":"lLKG.tsx","timestamp":1651028848187},{"id":"d39q.tsx","timestamp":1651028870966},{"id":"twGR.tsx","timestamp":1651029120292},{"id":"uj11.tsx","timestamp":1651030663997},{"id":"mTLS.tsx","timestamp":1651111459554},{"id":"Sd9l.tsx","timestamp":1651202605748},{"id":"efmk.tsx","timestamp":1652178471894}]}
@cjfff
cjfff / .cz-config.js
Created July 3, 2020 14:49 — forked from leohxj/.cz-config.js
cz-customizable with emoji
'use strict';
module.exports = {
types: [
{
value: 'WIP',
name : '💪 WIP: Work in progress'
},
{