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
[ | |
{ | |
"value": -12, | |
"text": "(GMT -12:00) Eniwetok, Kwajalein" | |
}, | |
{ | |
"value": -11, | |
"text": "(GMT -11:00) Midway Island, Samoa" | |
}, | |
{ |
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; |
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).
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.
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
[alias] | |
b = branch | |
bd = branch -D | |
c = commit -m | |
co = checkout | |
cob = checkout -b | |
p = pull | |
pune = pull --prune | |
s = status | |
undo = reset HEAD^ |
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
const supportsWebP = () => new Promise(resolve => { | |
const webP = new Image(); | |
webP.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA='; // 1x1 black pixel | |
webP.onload = webP.onerror = () => resolve(webP.height === 1); | |
}) | |
supportsWebP().then(hasWebP => console.log(hasWebP)); |
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 |
NewerOlder