As seen here: http://blog.z3bra.org/2014/01/images-in-terminal.html
Install packages w3m and some terminal emulator which supports images (urxvt, terminator, termite).
| read DL | |
| mkdir temp/ && cd temp | |
| usewithtor youtube-dl $DL | |
| DF="$(ls | grep ".mp4")" | |
| mv $DF ../$DF && cd ../ && rm temp/ | |
| vlc $DF |
| // Gulp module imports | |
| import {src, dest, watch, parallel, series} from 'gulp'; | |
| import del from 'del'; | |
| import livereload from 'gulp-livereload'; | |
| import sass from 'gulp-sass'; | |
| import minifycss from 'gulp-minify-css'; | |
| import jade from 'gulp-jade'; | |
| import gulpif from 'gulp-if'; | |
| import babel from 'gulp-babel'; | |
| import yargs from 'yargs'; |
| const compose = (a, b) => x => a(b(x)); | |
| const reverse = array => [...array].reverse(); | |
| // `get` is a simple accessor function, used for selecting an item in an array. | |
| const get = id => array => array[id]; | |
| // This functional version of map accepts our function first. | |
| const map = (fn, array) => array.map(fn); | |
| // `pluck` allows us to map through a matrix, gathering all the items at a |
As seen here: http://blog.z3bra.org/2014/01/images-in-terminal.html
Install packages w3m and some terminal emulator which supports images (urxvt, terminator, termite).
| // for more info about ReDoS, see: | |
| // https://en.wikipedia.org/wiki/ReDoS | |
| var r = /([a-z]+)+$/ | |
| var s = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaa!' | |
| console.log('Running regular expression... please wait') | |
| console.time('benchmark') | |
| r.test(s) |
| // ############################### | |
| // runPackager.js | |
| // ############################### | |
| // In this example, the IO function is tightly coupled with the implementation | |
| import { execFileSync } from 'child_process'; | |
| type RunPackagerOptions = { | |
| projectRoot: string, // CWD the react-native binary is being run from | |
| targetDir: string, // Target directory absolute or relative to projectRoot (e.g. 'rna/') |
https://after-on.com/episodes-31-60/040
Interesting podcast about the astronomical outlier object ʻOumuamua. Harvard Prof of Astronomy, Avi Loeb explores the idea that the object was a light-sail space craft sent from another civilization to check out earth.
If you search npm with query try await you will find a big modules list (you can find it in the boottom).
What all this developers want is just more clear way to use try catch. All of them suggest to use:
const tryCatch = require('try-catch');
const [error, data] = tryCatch(JSON.parse, 'hello');| import { CustomConsole } from '@jest/console'; | |
| function formatter(type, message) { | |
| switch(type) { | |
| case 'error': | |
| return "\x1b[31m" + message + "\x1b[0m"; | |
| case 'warn': | |
| return "\x1b[33m" + message + "\x1b[0m"; | |
| case 'log': | |
| default: |