This file contains hidden or 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
# First, set up ssh for Puhti | |
# Use ssh-copy-id to add your key | |
ssh-copy-id [email protected] | |
# This way, you don't have to type your password for every command | |
# Make a .txt file with one file name (relative) per line | |
# Copy this file to remote | |
scp ./download_list.txt [email protected]:. | |
# Log in |
This file contains hidden or 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
egrep ".*word$" /usr/share/dict/words |
This file contains hidden or 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 server = {}; // ... | |
const cookieParser = require('cookie-parser'); | |
const jwt = require('jsonwebtoken'); | |
server.express.use(cookieParser()); | |
server.express.use((req, res, next) => { | |
const { token } = req.cookies; | |
if (token) { | |
const { userId } = jwt.verify(token, process.env.APP_JWT_SECRET); | |
req.userId = userId; |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or 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
reverse, ending, length, is_word, ngram_weight, m_raw, f_raw, n_raw, m_freq, f_freq, n_freq, highest, predicted, correct, top | |
e, e, 1, 0, 473.2622, 306, 3562, 175, 0.0652, 0.8713, 0.0635, 0.8713, f, 3562, Woche, Seite, Frage | |
t, t, 1, 0, 416.4539, 1178, 1573, 873, 0.3479, 0.4234, 0.2287, 0.4234, f, 1573, Stadt, Arbeit, Welt | |
g, g, 1, 0, 369.4735, 727, 2307, 94, 0.3026, 0.676, 0.0214, 0.676, f, 2307, Regierung, Entscheidung, Zeitung | |
r, r, 1, 0, 362.7837, 2421, 336, 394, 0.7634, 0.1102, 0.1264, 0.7634, m, 2421, September, Oktober, November | |
re, er, 2, 0, 283.5243, 2063, 146, 280, 0.8272, 0.0535, 0.1193, 0.8272, m, 2063, September, Oktober, November | |
gn, ng, 2, 0, 278.8847, 197, 2301, 57, 0.0941, 0.8921, 0.0138, 0.8921, f, 2301, Regierung, Entscheidung, Zeitung | |
gnu, ung, 3, 0, 250.8859, 18, 2299, 0, 0.0093, 0.9907, 0, 0.9907, f, 2299, Regierung, Entscheidung, Zeitung | |
n, n, 1, 0, 234.9137, 671, 1019, 590, 0.297, 0.4714, 0.2316, 0.4714, f, 1019, Million, Information, Region | |
l, l, 1, 0, 136.552, 585, 175, 445, 0.4508, |
This file contains hidden or 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
# 0.1 makes it 10x as fast | |
ffmpeg -i input.mp4 -filter:v "setpts=0.1*PTS" output.mp4 |
This file contains hidden or 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
# https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality | |
ffmpeg -y -ss 0 -t 12 -i input.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -ss 0 -t 12 -i input.mp4 -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif |
This file contains hidden or 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
# -i Input | |
# -ss Starting timestamp HH:MM:SS.xxx | |
# -t duration | |
# https://superuser.com/questions/138331/using-ffmpeg-to-cut-up-video | |
# https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg | |
# -c copy | |
ffmpeg -ss 00:00:05 -i input.mp4 -t 00:00:15 output.mp4 |
This file contains hidden or 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
launchctl remove com.paragon-software.ntfs.notification-agent | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.installer.plist | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.ntfsd.plist | |
sudo launchctl unload -w /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist |
This file contains hidden or 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
# Append to /etc/fstab | |
LABEL=DRIVENAME none ntfs rw,auto,nobrowse |
This file contains hidden or 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
var $head = $('.entry h2.orth'); | |
var $placeholder = $('<div></div>'); | |
var nodes = $head[0].children; // Raw children nodes | |
// Strange enough this is an object! | |
// To iterate correctly without dropping nodes | |
// It must be converted to an array | |
_.toArray(nodes).forEach(child => { | |
if (child.type === 'text') { |
NewerOlder