Skip to content

Instantly share code, notes, and snippets.

View tuxpowered's full-sized avatar

TuxPowered tuxpowered

View GitHub Profile
@tuxpowered
tuxpowered / reset.sh
Created April 17, 2024 21:19 — forked from thoaster/reset.sh
Transmit 5 Trial Reset
#!/bin/sh
# Reset Transmit 5 Trial
# curl -fsSL https://gist.githubusercontent.com/thoaster/ca5b4fdb653b9cdb3930897045b78558/raw/reset.sh | bash
set +e
set -x
sudo rm -rf ~/Library/Caches/com.panic.Transmit
sudo rm -rf ~/Library/Application\ Support/com.panic.Transmit
sudo rm ~/Library/Preferences/com.panic.Transmit.plist
@tuxpowered
tuxpowered / error-404-page-not-found-80s-hacker-theme.markdown
Created January 23, 2023 23:26
Error 404: Page not found – 80s hacker theme
@tuxpowered
tuxpowered / pritunl-debian-11.sh
Last active December 5, 2022 19:03
Pritunl Debian 11 Install
#!/bin/bash
# Install required tools
apt install -y curl sudo gnupg2
# Create repository entry
sudo tee /etc/apt/sources.list.d/pritunl.list << EOF
deb https://repo.pritunl.com/stable/apt bullseye main
EOF
@tuxpowered
tuxpowered / ssh_timeit.py
Created April 19, 2022 00:04 — forked from ddutt/ssh_timeit.py
Benchmarking various Python SSH libraries for communicating with network devices
#!/usr/bin/env python3
import sys
import socket
from timeit import Timer
import asyncssh
import asyncio
import paramiko
@tuxpowered
tuxpowered / url_path_parser.py
Last active March 17, 2017 20:20
URL Path parser for Flask Apps
from flask import Flask
from werkzeug.routing import BaseConverter
app = Flask(__name__)
class FooConverter(BaseConverter):
regex = '[^/].*?'
weight = 200
def to_python(self, value):
@tuxpowered
tuxpowered / foo.log
Created March 16, 2017 22:51 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
from celery.task.schedules import crontab
from celery.decorators import periodic_task
@periodic_task(run_every=crontab(hour=7, minute=30, day_of_week="mon"))
def every_monday_morning():
print("This runs every Monday morning at 7:30a.m.")
@tuxpowered
tuxpowered / gist:43b5b264735a6de2f63595956b0e38a3
Created October 5, 2016 03:00
Add dehydrated/letsencrypt.sh to pfSense
# Login
ssh root@pfsense
# Install tools
pkg install -y bash git
cd /usr/local
/usr/local/bin/git clone https://github.com/lukas2511/dehydrated.git
# Configure dehydrated/letsencrypt.sh
@tuxpowered
tuxpowered / gist:7a30e29e25f9ad4df52649c73c39480d
Created August 3, 2016 01:07
Installing uwsgi on OSX El Capitan
I update my issue I found in Mac Os El Capitan. A solution taken from the suggestion of others.
Underlining issue is that OSX has older 0.9.x version of openssl. Installing uwsgi attempts to build against older libary.
find / -name "libssl.*.dylib" 2>/dev/null
/usr/lib/libssl.0.9.7.dylib
/usr/lib/libssl.0.9.8.dylib
/usr/local/Cellar/openssl/1.0.2d/lib/libssl.1.0.0.dylib <--- Installed by homebrew
/usr/local/lib/libssl.1.0.0.dylib
Then I built uwsgi as follows:
@tuxpowered
tuxpowered / 99-sites-enabled.conf
Last active August 29, 2015 14:25 — forked from mklooss/99-sites-enabled.conf
lighttpd sites enabled
# File in: /etc/lighttpd/conf-available/99-sites-enabled.conf
include_shell "/usr/share/lighttpd/include-sites-enabled.pl"