Skip to content

Instantly share code, notes, and snippets.

View fox.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View key.py
import cryptography
import datetime
import pgpy
pkalg = pgpy.constants.PubKeyAlgorithm.ECDSA
curve = pgpy.constants.EllipticCurveOID.NIST_P384
super_secret_number = 12345
created = 0 # datetime
View gist:fa483adfa58f4b2955f13e57efec4087
get_dev_by_usb_id() {
idV=${1%:*}
idP=${1#*:}
for path in $(find /sys/ -name idVendor 2> /dev/null | rev | cut -d/ -f 2- | rev); do
if grep -q $idV $path/idVendor; then
if grep -q $idP $path/idProduct; then
for bd in $(find $path -name 'device' | grep 'block' | rev | cut -d / -f 2 | rev); do
echo "/dev/$bd"
done
fi
View krb5_runas.sh
# Requires the "kinit" command
# Fedora: krb5-workstation
# OpenSUSE: krb5-client
# Ubuntu: krb5-user
# TODO: allow use of environment variables
USERN="$USER"
while (( "$#" )); do
View Adding a trusted RPM repo by URL.md

Execute for each repo you wish to add by URL:

sudo zypper -n ar -f <URL or path of repo file>

This command will error (with code 4) if an identical repository has already been added to the system.

@Higgs1
Higgs1 / _Factory Idle Mods.md
Last active Jun 9, 2018
Foxxie's Fantastical Factory Idle Mods
View _Factory Idle Mods.md

Foxxie's Fantastical Factory Idle Mods

Welcome to my collection of fantastically fabulous fox Factory Idle mods. All of these mods are completely free under the Hug-Ware license: "If we meet some day, and you think this stuff is worth it, you can give me a hug in return."

These mods do various neat things to help enhance your Factory Idle playing experience. Here's a short description of each and a link to automatically install them (assuming you already have the required software installed).

Enable Right Click Context Menu [disable right click.user.js]

Makes your normal right clicky context menu pop up when you right click, except in the map area so you can still delete things.

@Higgs1
Higgs1 / gist:67892140dc7f6cf30c5a0e2f7c20dd3f
Created Jul 12, 2016
Some Weird Derpy Telegram-CLI Makefile I Made
View gist:67892140dc7f6cf30c5a0e2f7c20dd3f
SRC_DIR=src
TGL_DIR=${SRC_DIR}/tgl
# SOURCE FILES
TG_FILES = main loop interface json-tg lua-tg python-tg python-types
MTP_FILES = common client key utils
TGL_FILES = binlog queries structures tgl tgl-net tgl-timers tg-mime-types tools updates $(addprefix mtproto-, ${MTP_FILES})
CRYPT_FILES = aes bn err md5 rand rsa_pem sha
AUTO_FILES = autocomplete fetch skip store types fetch-ds free-ds print-ds store-ds
@Higgs1
Higgs1 / install.sh
Last active Jul 12, 2016
Telegram CLI Install Script
View install.sh
#!/usr/bin/env bash
# To install Telegram-CLI, run the command:
# curl -s https://gist.githubusercontent.com/Higgs1/01448cace611ef60c004efa6ac3c1c90/raw | bash /dev/stdin
# Optionally specify an output file, otherwise will default to ./telegram-cli
GIT_REPO='https://github.com/Cojad/tg.git'
LUA='5.2' # LUA Version
PY='3.5' # Python Version