openpgp4fpr:C75E5171524765A2C4D8A4113A73F55BE2FDDE73
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
function transfer ($filename) | |
{ | |
$file = Get-Item $filename; | |
invoke-webrequest -method put -infile $file.FullName https://transfer.sh | |
} | |
"Test" | Set-Content .\test.txt | |
transfer(".\test.txt") |
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 | |
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de> | |
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/> | |
#### It is originally by freese60 and modified by limemonkey. | |
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> | |
### Uncomment this line to debug the script: | |
#set -x |
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
Script that will trigger a local to remote sync when any changes below your local Google Drive folder occur - but at max. every 10 minutes - and a remote to local sync every x (e.g. 30 minutes) via a cron job. | |
0. Install rclone and configure it for Google Drive | |
1. Create files listed below | |
2. Configure rclone_watch_local.sh to be run on startup (e.g. using a systemd service unit) | |
3. Add a cron job that runs rclone_remote2local.sh every x (e.g. 30) minutes | |
---------------------- | |
rclone_local2remote.sh | |
---------------------- |
Adding Static Wi-Fi IP address on Ubuntu/Debian and derivaties
- Begin by Hex encoding your wifi details
sudo wpa_passphrase "Your Wifi Network SSID" "Your Wifi WPA/WPA2 password"
Output:
network={
originally from Martin Kopta's blog
In order to shrink virtual disk of your virtual machine (process called disk space reclamation) in Qemu/KVM, you can go with following. In your running virtual machine, fill all remaining empty space with zeroes. Then, shut down virtual machine and convert the disk image from original format to the same format (esentially doing nothing). In the process of conversion, Qemu will skip the zeroes and save you some space. You can even add some compression to save even more space.
root@vm# dd if=/dev/zero of=/file
root@vm# rm /file
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
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
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
If your ISP is using PPPoE, lets set it up in your OpenWrt. Tested with DLink DIR-300(Rev.A) with OpenWrt Backfire 10.03.1. | |
Edit /etc/config/network. Under “WAN” section, set the configuration with: | |
config 'interface' 'wan' | |
option 'ifname' 'eth0.2' | |
option 'proto' 'pppoe' | |
option 'username' 'your-own-username' | |
option 'password' 'your-own-password' | |
option 'defaultroute' '1' | |
option 'peerdns' '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
### Keybase proof | |
I hereby claim: | |
* I am kyshman on github. | |
* I am kysh (https://keybase.io/kysh) on keybase. | |
* I have a public key ASBlFlpGYVvJxgyIzulH_nSPav4_ih6F9l4dIZ7DXrmzdwo | |
To claim this, I am signing this object: |