Steps to deploy Node.js to VPS using PM2 and Github Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
const input = fs.readFileSync('./01/input.txt', { encoding: 'utf8' }); | |
const injectNumbers = (text, name, value) => { | |
while (text.search(name) > -1) { | |
const index = text.search(name); | |
text = [text.slice(0, index + 1), value, text.slice(index + 1)].join(''); | |
} | |
return text; |
https://github.com/TriForceX/MiyooCFW/wiki/Custom-Firmware-Setup
PowKiddy Q90-V90 (Download)
- You need to remove all partitions of SD card using: Partition Wizard or SD Card Formatter
- If the CFW file is compressed on .7zip just extract using 7zip before proceeding
- Execute Win32DiskImager, select SD card, load the .IMG file and press Write button to proceed.
- Once the image is burned on the SD card, open Partition Wizard and choose Disk Management.
- Then right click on the "main" partition and choose extend (Set it to the maximum) and apply.
- Insert the SD into your console and turn it on. If it boots it is a success.
From: https://www.reddit.com/r/MacOS/comments/jy5ry8/m1_macbook_air_keysshortcut_for_keyboard/
Create a new plist file in ~/Library/LaunchAgents
named com.local.KeyRemapping.plist
and add the code below. Save the file and reboot. F5 and F6 will now work as keyboard brightness up/down keys (after you log in for the first time after rebooting).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Playlist | |
# playlist id: PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
# or | |
youtube-dl -f mp4 -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR | |
# or | |
# 135 = 480p mp4, 140 = m4a | |
youtube-dl -f '135+140/mp4' -o '~/Downloads/%(playlist_index)s-%(title)s.%(ext)s' -i PLNw_hEO5pK1pzbx5q5mcdpSKzHzgDSPjR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global credential.helper osxkeychain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults write -g com.apple.mouse.scaling -1 | |
defaults write -g com.apple.trackpad.scaling -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const reservedClassMethodNames = { | |
componentDidCatch: 1, | |
componentDidMount: 1, | |
componentDidUpdate: 1, | |
componentWillMount: 1, | |
componentWillReceiveProps: 1, | |
componentWillUnmount: 1, | |
componentWillUpdate: 1, | |
constructor: 1, | |
getDerivedStateFromError: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const crypto = require('sjcl') | |
const iter = 1000 | |
const ks = 256 | |
export const decrypt = (password, encrypted) => crypto.decrypt(password, encrypted) | |
export const encrypt = (password, text) => crypto.encrypt(password, text, { iter, ks }) |
NewerOlder