Skip to content

Instantly share code, notes, and snippets.

status is-interactive
or exit 0
if test -n "$XDG_RUNTIME_DIR"
set -g __starship_async_tmpdir "$XDG_RUNTIME_DIR"/fish-async-prompt
else
set -g __starship_async_tmpdir /tmp/fish-async-prompt
end
mkdir -p "$__starship_async_tmpdir"
set -g __starship_async_signal SIGUSR1
@hacker1024
hacker1024 / mygov_totp_storage.md
Last active August 16, 2023 18:01
Information about TOTP token storage in the myGov Code Generator app, as well as token extraction instructions.

This gist contains information about TOTP token storage in the myGov Code Generator app, along with instructions on how to extract tokens.

App data

Structure

/data/user/0/au.gov.dhs.centrelink.mygovauthenticator:
├───files
│ myGov.ks
@soraxas
soraxas / git-go_next
Last active July 1, 2020 16:46
Git utilities! :) It's now being tracked in a standalone repository https://github.com/soraxas/git-utils
#!/bin/bash
# test git is working in cwd
# git || exit 1
# declare a wrapper function for git
git() {
command git "$@" || exit 1
}
@maky-hnou
maky-hnou / Install CUDA 10.1 and Cudnn 7.6.5 on Ubuntu18.04
Last active April 29, 2022 18:16
Install cuda10.1 and cudnn 7.6.5 on Ubuntu 18.04
# Install Cuda 10.1 and Cudnn 7.6.5 on Ubuntu 18.04
## Start clean
sudo apt purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt autoremove && apt autoclean
sudo rm -rf /usr/local/cuda*
@dmfigol
dmfigol / asyncio_loop_in_thread.py
Last active June 12, 2024 07:52
Python asyncio event loop in a separate thread
"""
This gist shows how to run asyncio loop in a separate thread.
It could be useful if you want to mix sync and async code together.
Python 3.7+
"""
import asyncio
from datetime import datetime
from threading import Thread
from typing import Tuple, List, Iterable
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 28, 2024 14:47 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@hwkr
hwkr / namecheap-synology-ddns.php
Created April 21, 2017 06:58
Add custom DDNS provider for Namecheap on Synology NAS - ( The horrors )
#!/usr/bin/php -d open_basedir=/usr/syno/bin/ddns
<?php
/*
Usage Instructions ( Obviously your domain has to be hosted on Namecheap )
1) Copy this file to /usr/syno/bin/ddns/namecheap.php
2) Add the following entry in /etc.defaults/ddns_provider.conf
[Custom - Namecheap]
modulepath=/usr/syno/bin/ddns/namecheap.php
@tueda
tueda / gist+x.sh
Last active May 23, 2020 12:37
A script to give executable file permissions to files in a Gist.
#! /bin/sh
#
# @file gist+x.sh
#
# Gives executable file permissions to files in a Gist.
#
set -e
prog=`basename "$0"`
# Command line options.