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
# Reliable persistent SSH-Tunnel via systemd (not autossh) | |
# https://gist.github.com/guettli/31242c61f00e365bbf5ed08d09cdc006#file-ssh-tunnel-service | |
[Unit] | |
Description=Tunnel for %i | |
After=network.target | |
[Service] | |
User=tunnel | |
ExecStart=/usr/bin/ssh -o "ExitOnForwardFailure yes" -o "ServerAliveInterval 60" -N tunnel@%i |
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
var fs = require('fs'); | |
var zlib = require('zlib'); | |
// Read local subtitle, gunzip it, encode to base64 | |
var toUpload; // future gunzipped/base64 encoded string | |
var path = 'foo/bar.srt'; // path to subtitle | |
fs.readFile(path, function(err, data) { // read subtitle | |
if (err) throw err; // handle reading file error | |
zlib.deflate(data, function(err, buffer) { // gunzip it | |
if (err) throw err; // handle compression error |
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
UPDATE `wp_postmeta` | |
SET meta_value='taxable' | |
WHERE meta_key='_tax_status' |
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
console.reset = function () { | |
return process.stdout.write('\033c'); | |
} |
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
#!/bin/bash | |
# BASH shell script for mounting an encrypted EncFS folder for | |
# for sharing with other user/users who are member of $GROUP | |
# Since EncFS runs in userland, no root privileges are needed. | |
# Remember to uncomment user_allow_other in /etc/fuse.conf | |
# It is currently configured to mount the encrypted folder: | |
# ~/.private | |
# on the unencrypted mount point (which is created upon mount): | |
# ~/private |