Skip to content

Instantly share code, notes, and snippets.

View palevell's full-sized avatar

Patrick Allan palevell

View GitHub Profile
@palevell
palevell / filename2long.patch
Created January 14, 2020 15:33
This patch fixes 'Filename too long' errors when video titles are too long for the filesystem.
*** /usr/local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py 2020-01-14 08:51:17.908524990 -0500
--- youtube_dl/YoutubeDL.py 2020-01-14 09:06:18.785934554 -0500
***************
*** 635,640 ****
--- 635,646 ----
try:
template_dict = dict(info_dict)
+ ##### 2020-Jan-13 PAL - Fix 'Filename too long errors' - BEGIN
+ if 'title' in template_dict.keys():
@palevell
palevell / tpoff.sh
Last active February 9, 2020 15:45
Creates BASH aliases for toggling laptop touch devices ON/OFF
#!/usr/bin/env bash
# tpoff.sh v1.0.9 - Sunday, February 9, 2020
# Create commands (aliases) to toggle touch devices ON/OFF
XINPUT=/usr/bin/xinput
if [ -x $XINPUT ]; then
DEVNAMES=()
DEVNAMES+=("Synaptics TouchPad")
DEVNAMES+=("AlpsPS/2 ALPS DualPoint TouchPad")
DEVNAMES+=("AlpsPS/2 ALPS DualPoint Stick")
@palevell
palevell / idle_accts_cshell_eh.md
Last active June 13, 2020 01:19
Idle Accounts Followed by @cshell_eh
@palevell
palevell / index.html
Last active April 26, 2023 00:48
ChatGPT Responsive Home Page #1
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<title>My Blog Homepage</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
@palevell
palevell / markdown_parser.py
Last active May 7, 2023 18:07
Parses message.content of OpenAI chat responses
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# markdown_parser.py - Sunday, May 7, 2023
# Via ChatGPT
import os
import re
import sys
import argparse
import subprocess
@palevell
palevell / Howto.md
Created May 13, 2023 19:07 — forked from brentjanderson/Howto.md
SSH Tunneling with Firefox

Sometimes it is useful to route traffic through a different machine for testing or development. At work, we have a VPN to a remote facility that we haven't bothered to fix for routing, so the only way to access a certain machine over that VPN is via an SSH tunnel to a machine that is reachable over the VPN. Other times, I have used this technique to test internet-facing requests against sites I am developing. It is pretty easy, and if you don't use firefox regularly, you can treat Firefox as your "Proxy" browser and other browsers can use a normal configuration (Although you can also configure an entire system to use the proxy, other articles exists that discuss this potential).

  1. Open a terminal