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}
@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 July 27, 2024 15:44 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@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}
/*-----------------------------------------------------------*\
| 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
@Alistair1231
Alistair1231 / docker-compose.yaml
Created December 27, 2020 09:30
n.eko with m1k1o fork and nginx reverse proxy (ssl)
version: "2.0"
services:
neko:
image: m1k1o/neko:latest
restart: always
shm_size: "1gb"
ports:
- "8080:8080"
- "59000-59100:59000-59100/udp"
environment:
@Alistair1231
Alistair1231 / changeTitle.ps1
Created March 22, 2021 10:24
Change MKV Title to part of filename for all files in folder
# path to mkvpropedit
$propedit = "mkvpropedit"
# path where files are
$path="D:\!USENET\!Anime\Hunter X Hunter (2011)"
#substring vals
$skipCharacters=14
$saveCharacters=28
#example: skip 14, save 28
@Alistair1231
Alistair1231 / _split.ps1
Created May 4, 2021 08:16
split audio files into same length parts
# Split MP3/M4A/M4B files into 5 min parts
# Known Issues:
# recursive folders don't work. seperate files I also screwed up. Just give it 1 folder, or use _splitAll.ps1 for multiple folders.
# afterwards you can search in the folder with everything (https://www.voidtools.com/support/everything/)
# like this : "D:\!!Downloads\!audiobook\" !_ to find everything without an underscore (_) which should most likely only be the
# original files and delete them
# if windows refuses to execute the scripts try something like this in an admin powershell (Win+X A):
# Set-ExecutionPolicy Unrestricted
for ($i = 0; $i -lt $args.Count; $i++) {