Skip to content

Instantly share code, notes, and snippets.

View thwaller's full-sized avatar
🏠
Working from space

thwaller thwaller

🏠
Working from space
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active May 5, 2024 23:29
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/" */
@iPublicis
iPublicis / trelloinstall.sh
Last active April 21, 2023 17:44
Install Trello Linux Client
#!/bin/bash
# Your system should be 64 bits and check if the last version at https://github.com/danielchatfield/trello-desktop/ is 0.19
# If the current version is not 0.19 change the file name below accordingly
wget https://github.com/Racle/trello-desktop/releases/download/v0.2.0/Trello-linux-0.2.0.zip -O trello.zip
sudo mkdir /opt/trello
sudo unzip trello.zip -d /opt/trello/
sudo ln -sf /opt/trello/Trello /usr/bin/trello
echo -e '[Desktop Entry]\n Version=1.0\n Name=Trello Desktop\n Exec=/usr/bin/trello\n Icon=/opt/trello/resources/app/static/Icon.png\n Type=Application\n Categories=Application' | sudo tee /usr/share/applications/trello.desktop
@eterps
eterps / setup_sway
Created December 7, 2018 12:10
Install Sway (a tiling Wayland compositor) on Ubuntu
#!/bin/bash
set -e
# Based on: https://gist.github.com/concatime/265fa14d260f3aa237ddf991d58dd639
mkdir /tmp/setup_sway
cd /tmp/setup_sway
# === Helpers ===
@lambdaverse
lambdaverse / jdk-squashfs-ramdisk-ubuntu.md
Last active November 3, 2020 22:00
JDK on ram disk with Ubuntu 14.04
  1. Create RAM disk
  2. Create JAVA squashfs
  3. Mount Java to RAM disk
  4. Set Java to default

make RAMDISK using tmpfs:

$shell > sudo mkdir /media/ramdisk
$shell > sudo mount -t tmpfs tmpfs /media/ramdisk
@JacobJohansen
JacobJohansen / AuthyToOtherAuthenticator.md
Created October 20, 2017 15:12 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@krasCGQ
krasCGQ / PreferredSettings.md
Last active March 4, 2024 17:09
My personal prefered settings for encoding media files, especially audio.

Disclaimer

If you decide to follow my settings, I'm not responsible for anything that happens if you decide to go careless and become a priceless dumb. All commands are done in Linux PC using corresponding CLI programs. In Windows, just add .exe after CLI program name.

Free Lossless Audio Codec (FLAC)

I prefer maximum compression as possible with replay gain applied. This command below will silence all warnings, especially when dealing with Hi-Res audios: a.wav: WARNING: Legacy WAVE file has format type 1 but bits-per-sample=24

$ flac --totally-silent --delete-input-file --replay-gain -V8 .wav
@Necklaces
Necklaces / ufw_vpn_killswitch_tutorial.md
Last active February 28, 2024 22:13
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but it's usually something like

@darencard
darencard / auto_git_file.md
Last active May 1, 2024 23:18
Automatic file git commit/push upon change

Please see the most up-to-date version of this protocol on my blog at https://darencard.net/blog/.

Automatically push an updated file whenever it is changed

Linux

  1. Make sure inotify-tools is installed (https://github.com/rvoicilas/inotify-tools)
  2. Configure git as usual
  3. Clone the git repository of interest from github and, if necessary, add file you want to monitor
  4. Allow username/password to be cached so you aren't asked everytime
@twkm
twkm / vpnkillswitch.sh
Created April 20, 2017 14:52
General VPN Killswitch using UFW
#!/bin/bash
### BEGIN INIT INFO
# Provides: killswitch
# Required-Start: openvpn $network $remote_fs $syslog
# Required-Stop: openvpn $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: VPN Killswitch
# Description: This script uses UFW to ensure all traffic goes through VPN
@shrikantgg
shrikantgg / index.html
Last active July 29, 2017 00:32
Pure CSS Social Media Icons
<div class="footer-social-icons">
<h4 class="_14">Follow us on</h4>
<ul class="social-icons">
<li><a href="" class="social-icon"> <i class="fa fa-facebook"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-twitter"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-rss"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-youtube"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-linkedin"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-google-plus"></i></a></li>
</ul>