Skip to content

Instantly share code, notes, and snippets.

View Snuggle's full-sized avatar
🍵
Fueled by bubble tea!

Evie ​Snuggle Snuggle

🍵
Fueled by bubble tea!
View GitHub Profile
if [ "$(ifconfig | grep 217.169.20.20)" ]; then
echo "L2TP Tunnel is UP"
else
echo "L2TP Tunnel is DOWN"
echo "Restarting interface"
/usr/local/etc/rc.linkup stop l2tp0
/usr/local/etc/rc.linkup start l2tp0
echo "Killing existing process"
kill $(cat /var/run/l2tp_opt2.pid)
sleep 5
@Snuggle
Snuggle / l2tp-rhel
Last active April 29, 2024 11:20
L2TP on Red Hat Linux
https://access.redhat.com/solutions/53031
When RHEL has multiple IPs configured, only one is reachable from a remote network. Or why does RHEL ignore packets when the route for outbound traffic differs from the route of incoming traffic?
Solution Verified - Updated November 30 2023 at 4:36 PM - English
Environment
Red Hat Enterprise Linux (RHEL) 6 and later
Issue
#!/usr/bin/env python3
import mastodon as Mastodon
import requests
url = "https://scontent-man2-1.cdninstagram.com/v/t51.2885-15/294852204_824351222308449_3836600275452228447_n.jpg?stp=dst-jpg_e35_p480x480&_nc_ht=scontent-man2-1.cdninstagram.com&_nc_cat=109&_nc_ohc=gNaRLPxrcjUAX-Esrfg&tn=I6IE7pLwRFWQAD-P&edm=AJ9x6zYBAAAA&ccb=7-5&ig_cache_key=Mjg4Nzg5OTEyNjA1NDM4NTUwNQ%3D%3D.2-ccb7-5&oh=00_AT8KLG2PPEayIRAT7hVQtGSp48nE9vGGNWz8_ZdoBywfpg&oe=62E3A11E&_nc_sid=cff2a4"
print(Mastodon)
#Mastodon.Mastodon.create_app(
# 'snuggle_pixelfed',
# api_base_url = 'https://pixelfed.social',
<module 'mastodon' from '/home/snuggle/.local/lib/python3.6/site-packages/mastodon/__init__.py'>
Mastodon: Request to endpoint "https://pixelfed.social/api/v1/instance/" using method "GET".
Parameters: {}
Headers: {'Authorization': 'Bearer pytooter_usercred.secret'}
Files: {}
Mastodon: Response received with code 200.
response headers: {'Date': 'Sun, 24 Jul 2022 14:43:18 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'vary': 'Accept-Encoding', 'Cache-Control': 'no-cache, private', 'x-xss-protection': '1; mode=block', 'x-content-type-options': 'nosniff', 'Content-Encoding': 'gzip', 'CF-Cache-Status': 'DYNAMIC', 'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=LkBQr%2BniJqv0m9i1TrBd6sYDxMNsmD%2FEin8Tbl459lcT0dkTXaHiN6YkzAs3E1ZEzJf7cpZ%2BiyJYliCxn4gTWb2yTw7lPcim0dowHg7A42Znxo2qXlTp0ueYRb5DIgmryQ%3D%3D"}],"group":"cf-nel"
#!/usr/bin/env python
"""
Copyright (c) 2010 Timothy J Fontaine <tjfontaine@atxconsulting.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

💜 FairyShell v 0.1 💜

A Windows Terminal Theme based on @sailorhg's Fairy Floss theme

N.B. This uses Powershell as my shell but you can change this by changing the commandline value in the profile below!

Instructions:

Optional pre-setup

  • If you want the font I use here install instructions can be found here else Consolas is a fine replacement untill Cascadia is out 💖
  • If you want the Fairy Floss graphic in the background, you can get it from here and save it to the directory where your profile.json file is stored in the next step.
@Snuggle
Snuggle / camlink-linux
Created May 10, 2021 23:06
Elgato Cam Link 4K on GNU/Linux
@Snuggle
Snuggle / delete-darktable-rejected.sh
Created January 20, 2021 19:48 — forked from hector6872/delete-darktable-rejected.sh
Delete all Darktable rejected and low-rated pictures
#!/bin/sh
if [ -z "$1" ]; then
echo Delete all Darktable rejected pictures
echo
echo "Usage:"
echo $0 [source] --onestar to delete also all pictures with one star rating
exit 1
fi
{
"meta": {
"theme": "rocketspacer"
},
"basics": {
"name": "Evie Snuggle",
"label": "👩🏽‍💻 · Site Reliability Engineer (SRE)",
"summary": "I love experimenting with and testing out new technologies, it's thrilling to see new ideas shape the world in a completely new ways. For personal projects: I've created a cloud-storage server with AWS S3-style Object Storage, hosted a Steam games library over iSCSI using ZFS w/deduplication over a small peer-to-peer Thunderbolt 3 network and live and breathe tech every day as part of my hobbies.",
"website": "https://snugg.ie",
"picture": "https://github.com/Snuggle.png",