Skip to content

Instantly share code, notes, and snippets.

View ngochangjelly's full-sized avatar

JellyTran ngochangjelly

View GitHub Profile
// code of this video https://www.youtube.com/watch?v=cWNEl4HE2OE
const airports = 'PHX BKK OKC JFK LAX MEX EZE HEL LOS LAP LIM'.split(' ')
const routes = [
['PHX', 'LAX'],
['PHX', 'JFK'],
['JFK', 'OKC'],
['JFK', 'HEL'],
['JFK', 'LOS'],
@ngochangjelly
ngochangjelly / changeFileName.js
Last active June 7, 2022 16:13
replace filename with a pattern in a folder for nodejs
const { promisify } = require('util');
const { argv } = require('process')
const fs = require('fs');
const path = require('path');
const folder = argv[2]
const oldPattern = argv[3]
const newPattern = argv[4]
const directoryPath = path.join(__dirname, folder);
let buttons = document.getElementsByClassName('btn btn-sm')
Array.from(buttons).map((bt) => {
if(bt.value === 'Unfollow') {
return
}
bt.click()
})

Keybase proof

I hereby claim:

  • I am ngochangjelly on github.
  • I am jellytran (https://keybase.io/jellytran) on keybase.
  • I have a public key ASCaSw72OL_S7tIPpZ4RisFjDSLYNSnm0zSJcEWaw9kbdgo

To claim this, I am signing this object: {