Skip to content

Instantly share code, notes, and snippets.

View Alistair1231's full-sized avatar

Alistair1231 Alistair1231

View GitHub Profile
@sebald
sebald / latex_xml_style.tex
Created July 17, 2012 17:53
Latex Listing XML Style
\usepackage{listings}
\usepackage{color}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\definecolor{gray}{rgb}{0.4,0.4,0.4}
\definecolor{darkblue}{rgb}{0.0,0.0,0.6}
\definecolor{lightblue}{rgb}{0.0,0.0,0.9}
\definecolor{cyan}{rgb}{0.0,0.6,0.6}
@fuzzykiller
fuzzykiller / Greasemonkey.js
Last active January 3, 2025 14:41 — forked from azu/Greasemonkey.js
Greasemonkey API stubs with JSDoc, for WebStorm etc
/**
* Created by azu.
* Date: 10/11/28
* Updated by fuzzykiller (2015/08/28)
* License: MIT License
*/
/**
* An object that exposes various information about Greasemonkey and the running User Script.
*/
@alexjohnj
alexjohnj / Makefile
Created May 16, 2016 14:44
A generic Makefile template for somewhat complicated LaTeX documents.
# This is a generic Makefile that can be used to compile somewhat complicated
# LaTeX documents. It assumes a directory structure like this
# .
# ├── figures/*.{pdf,tex}
# ├── MAIN.tex
# ├── Makefile
# ├── Preamble.tex
# ├── sections/*.tex
# └── latex.out/
# and that you want to use a LaTeX runner such as latexrun or latexmk. The
@pratos
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 30, 2025 05:50 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@ahmaurya
ahmaurya / latex_python_code_highlights.tex
Created September 27, 2017 03:22
LaTeX Python Code Highlights
\usepackage{xcolor}
\usepackage{listings}
\definecolor{maroon}{cmyk}{0, 0.87, 0.68, 0.32}
\definecolor{halfgray}{gray}{0.55}
\definecolor{ipython_frame}{RGB}{207, 207, 207}
\definecolor{ipython_bg}{RGB}{247, 247, 247}
\definecolor{ipython_red}{RGB}{186, 33, 33}
\definecolor{ipython_green}{RGB}{0, 128, 0}
\definecolor{ipython_cyan}{RGB}{64, 128, 128}
@therealmarv
therealmarv / init.lua
Created November 21, 2017 14:28
hammerspoon Umlaute
-- Umlaute
hs.hotkey.bind({'alt'}, 'u', function ()
hs.eventtap.keyStrokes('ü')
end)
hs.hotkey.bind({'shift', 'alt'}, 'u', function ()
hs.eventtap.keyStrokes('Ü')
end)
/*-----------------------------------------------------------*\
| THIS IS JUST A BACKUP FOR MY SERVER MIGRATION... |
| EVERYTHING MIGHT BE WRONG. IT WORKED FOR ME |
| AFTER MUCH FIDDLING I MIGHT HAVE FORGOTTEN SOME DETAILS |
\*------------------------------------------------------------*/
//tested with ubuntu 16.04 headless
//PIA setup
docker network create pia_network
@Alistair1231
Alistair1231 / .antigen-setup.sh
Last active January 2, 2024 12:24
installs antigen and applies my personal config
#!/bin/bash
set -x
# curl -L "https://gist.githubusercontent.com/Alistair1231/aaedcf19be1102ae3d1472407f1f380e/raw/.antigen-setup.sh" | bash && zsh
# curl -L "https://gist.githubusercontent.com/Alistair1231/aaedcf19be1102ae3d1472407f1f380e/raw/.antigen-setup.sh" | sudo bash && sudo zsh
case $(command -v apt pacman dnf zypper 2>/dev/null) in
*apt) sudo apt update; sudo apt install build-essential git zsh -y;;
*pacman) sudo pacman -Sy; sudo pacman -S --noconfirm --needed base-devel git zsh;;
*dnf) sudo dnf install make automake gcc gcc-c++ kernel-devel git zsh;;
@jeschkies
jeschkies / resilio-sync.repo
Created July 27, 2020 13:53
Resilio Sync repo definition for dnf.
[resilio-sync]
name=Resilio Sync
baseurl=https://linux-packages.resilio.com/resilio-sync/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=https://linux-packages.resilio.com/resilio-sync/key.asc
sslverify=1