View build-electron-exe.zsh
#!/bin/zsh | |
# tell electron packager's rcedit.exe to use wine64 | |
export WINE=`which wine64` | |
export WINEARCH=win64 | |
export WINE_ARCH=win64 | |
# possibly interesting information | |
# https://wiki.winehq.org/Debug_Channels | |
# unset WINEDEBUG |
View osx-snippet-delete.js
/* | |
⚠️ It does not prompt or ask permission. It just deletes all the snippets! | |
usage: node osx-snippet-delete.js | |
*/ | |
const path = require("path"); | |
const {exec} =require("child_process") |
View ssh-host-keys.sh
# v--automatic yes | |
yes | ssh-keygen -q -t ed25519 -N '' -f /etc/ssh/ssh_host_ed25519_key | |
yes | ssh-keygen -q -t rsa -b 2048 -N '' -f /etc/ssh/ssh_host_rsa_key | |
# what bits do you want? ---^ |
View nice-browser-sync.zsh
#!/bin/zsh | |
browser-sync start -w --ss dist --port 9924 --host 127.0.0.1 --logLevel error --no-notify --no-open --no-ui --no-online --no-ghost-mode |
View telegram-bot.js
/* | |
# the basic echo bot | |
Instructions: | |
+ Pops up the docs in the browser | |
+ npm docs node-telegram-bot-api | |
+ Install the bot module | |
+ npm install node-telegram-bot-api | |
+ Dump in this code into a JS file like ./index.js |
View convert-mov-to-gif.sh
ffmpeg -i incoming.mov -s 300x200 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --dither > outgoing.gif | |
# https://github.com/chrisjmendez/convert-mov-to-gif |
View webpack.config.js
/* | |
# webpack config | |
npm install webpack webpack-cli uglifyjs-webpack-plugin @babel/core @babel/cli @babel/register @babel/preset-env @babel/preset-react babel-loader react react-dom | |
https://webpack.js.org | |
https://webpack.js.org/configuration | |
*/ |
View .eslintrc
{ | |
"env": { | |
"es6": true, | |
"node": true | |
}, | |
"plugins": ["prettier"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:prettier/recommended" | |
], |
View decode-aion-keystore.js
/* | |
use aion-rlp to decode an aion keystore v3 binary encoded file | |
the output is shown by index | |
the next step is decrypt aes-128-ctr | |
*/ |
View mocha.opts
--colors | |
--reporter spec | |
--ui bdd | |
# stop if there's an error | |
--bail | |
# give us a full explanation | |
--full-trace |