Skip to content

Instantly share code, notes, and snippets.

@dschense
dschense / obsidian-web-clipper.js
Created January 3, 2024 09:24 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@dschense
dschense / howto
Last active January 10, 2022 17:05
Run XFCE Desktop on Headless Proxmox Container - Ubuntu 20.04 RDP
$ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
## Select lightdm when asked which desktop
$ sudo apt install xrdp
$ sudo update-alternatives --set x-session-manager /usr/bin/xfce4-session
## Now use Remote Desktop to RDP into the IP address. Easy enough, now you can lock it down if doing something outside of trying to set this up.
@dschense
dschense / network.bat
Last active December 23, 2020 09:15
windows change network
@echo off
REM https://community.spiceworks.com/how_to/320-batch-file-script-to-change-ip-addresses
echo Choose:
echo [A] Set Static IP
echo [B] Set DHCP
echo.
:choice
SET /P C=[A,B]?
for %%? in (A) do if /I "%C%"=="%%?" goto A
for %%? in (B) do if /I "%C%"=="%%?" goto B
@dschense
dschense / get-it-running
Last active April 3, 2024 17:53
Rclone Service Windows 10
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
dschense / init.vim
Created April 3, 2020 06:40
Copy/Paste vim/nvim
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
@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
dschense / AuthyToOtherAuthenticator.md
Created January 18, 2020 00:17
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:
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
dschense / hugo-on-android.md
Created May 1, 2019 11:35 — forked from bep/hugo-on-android.md
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
dschense / .bashrc
Created August 13, 2018 19:26
ParrotOs graphical .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
HISTCONTROL=ignoredups:ignorespace