Skip to content

Instantly share code, notes, and snippets.

dschense / network.bat
Last active Dec 23, 2020
windows change network
View network.bat
@echo off
echo Choose:
echo [A] Set Static IP
echo [B] Set DHCP
SET /P C=[A,B]?
for %%? in (A) do if /I "%C%"=="%%?" goto A
for %%? in (B) do if /I "%C%"=="%%?" goto B
dschense / get-it-running
Last active Nov 17, 2020
Rclone Service Windows 10
View get-it-running
Copy nssm.exe to same directory that rclone is in. I launched NSSM, by opening an elevated command line. Type cmd in the search bar and right click and choose “run as administrator.”
1. cd c:\rclone (or wherever you have rclone located)
2. nssm install “Rclone Mount”
3. Fill in the info below
4. Still in the command prompt, type services.msc
5. Scroll down and choose your service and right click and start it.
6. If it fails to start, stop the service
7. Go back to command prompt and run sc.exe delete “Rclone Mount”
8. Enter the command from step 2 above and repeat until you complete everything with no typos and it works.
dschense / init.vim
Created Apr 3, 2020
Copy/Paste vim/nvim
View init.vim
Add this to your config
"Copy and paste key bindings
vnoremap <C-c> "*y :let @+=@*<CR>
map <C-v> "+P
gvim has to be installed
View gist:da127f8ccf6ec610e584e8bccc5e148a
@dAnjou found a way to do this:
(Tested with KeePassXC on Fedora 25)
By default when using GNOME Keyring you have a keyring that is unlocked when you log in (usually called "Login"). You can make use of that by storing a KeePass database password in this keyring and using it to automatically unlock your KeePass database.
Store the KeePass database password in GNOME Keyring. You'll have to set a label and at least one attribute/value pair. The label is displayed in a GNOME keyring manager (e.g. Seahorse), the attribute/value pair should be a unique identifier because it's needed for the lookup. I suggest to use keepass as attribute and the database name as value (make sure it doesn't contain any spaces).
secret-tool store --label="KeePass <database_name>" keepass <database_name>
Then create a script to launch and immediately unlock your KeePass database.
dschense /
Created Jan 18, 2020
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators

  1. Install Authy from Chrome Web Store: Download
  2. Open Authy and log in, so you can see the codes being generated for you
  3. Go to Extensions page in your browser: chrome://extensions/ or Menu -> More tools -> Extensions)
  4. Tick developer mode in top right corner
  5. Find Authy from the list and then click on main.html
  6. Chrome developer tools with Console selected should open. If it didn't, go to Console tab.
  7. Paste following and press enter:
View qmi_strength
function qmi_strength {
dbm=`$COMMAND_PREFIX $QMICLI -d $CDC_WDM --nas-get-signal-strength | tr "'" " " | grep Network | head -1 | awk '{print $4}'`
echo -n "Signal strength is "
if [ $dbm -ge -73 ]; then
echo -n 'Excellent'
elif [ $dbm -ge -83 ]; then
echo -n 'Good'
elif [ $dbm -ge -93 ]; then
echo -n 'OK'
elif [ $dbm -ge -109 ]; then
dschense /
Created May 1, 2019 — forked from bep/
Run Hugo on an Android phone

First install Termux

Then there are two options:

Build from source

Open the Termux terminal on your Android device and copy-and-paste the commands listed below and hit ENTER:

dschense / .bashrc
Created Aug 13, 2018
ParrotOs graphical .bashrc
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
dschense / installation
Created Oct 21, 2017
View installation
Installationsanleitung für Archlinux mit BTRFS - Snapshots - Rollback etc. alles was das Herz begehrt!
UEFI - Installation:
- Boot iso:
dschense /
Created May 11, 2017
Servercow dyndns update-script for cron
#This is a little script to update dyndns for
#the script uses the official - updatelink
#fill in the example lines to use your personal settings.
#change to your main domain part
#tmp file to store the ip