Skip to content

Instantly share code, notes, and snippets.

View bdmorin's full-sized avatar
👁️‍🗨️
the horrors persist, but so do l

Brian bdmorin

👁️‍🗨️
the horrors persist, but so do l
View GitHub Profile
@bdmorin
bdmorin / convert_fish_to_zsh_history.py
Created July 2, 2024 15:55
fish history to zsh history
#!/usr/bin/env python3
# default verbose
import os
import time
from pathlib import Path
def convert_fish_to_zsh_history():
fish_history_path = Path.home() / '.local/share/fish/fish_history'
zsh_history_path = Path.home() / '.zsh_history'
@bdmorin
bdmorin / dns_test.py
Created June 26, 2024 13:48
Very simple unit test for DNS
import unittest
import yaml
import dns.resolver
# Load the YAML file
with open('dns_tests.yaml', 'r') as file:
test_cases = yaml.safe_load(file)
class TestDNSLookup(unittest.TestCase):
def dns_lookup(self, host, record_type):
@bdmorin
bdmorin / mocha_kagi.css
Created June 25, 2024 18:31
catppuccin mocha for kagi
/* Catppuccin Mocha Theme for Kagi */
.search-input-container {
position: relative;
width: 100%;
color: #d9e0ee;
background-color: #1e1e2e;
border-radius: 2rem !important;
border: 1px solid #f5c2e7 !important;
transition-duration: 0.2s;
@bdmorin
bdmorin / demo.yml
Created June 15, 2024 17:49
example GH wf
name: CI Pipeline
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
{
description = "Colmena nixflake demo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
colmena.url = "github:zhaofengli/colmena";
};
outputs = { self, nixpkgs, flake-utils, colmena }:
@bdmorin
bdmorin / convert_tatulli_troxide.md
Created June 3, 2024 17:51
troxide import tatulli tv shows.

#troxide user? You can import your tatulli information like this.

$ sqlite3 /opt/stacks/tautulli/tautulli.db 'SELECT
  json_extract(tvmaze_json, \'$.id\') AS show_id,
  json_extract(tvmaze_json, \'$.name\') AS show_name
  FROM tvmaze_lookup;' > tvm.export

$ echo '( version:1, series: [' > tatulli.import
$ awk -F\| '{print "(id:$1,name:\"$2\", is_tracked: true; seasons: {}),"}' >> tatulli.import
@bdmorin
bdmorin / mastodon_hashtags.md
Created June 2, 2024 04:21
Odd mastodon hashtags

#mbVgcCFXra3NCuRcPHidHFP4wqD1KcPCjVrtIyYJTaCyi1UMvxbmRpmAjTPfu6JBbyaUHzd6ruzDfbInDd4qs5qifpcfjm9ujOJJWnnsNH7GS68z7EBlSKiypIjC2ZNqNluhYpBAAB6bH9a5vLpp95TjjBVrE5LnbptaM9PJyJFNSeXWUHrfRnOXHObs9Er6krhXJXzzi0GmZvxVp5F9g7BxGty7R3mAEyuJy6LC88sP71WeWQYAoNjR2i7W8AlxSUJ3a8ynam7OlHxJiIqL9LJ9R5GxfkfP5tnOBqqpzUOOuTwyKFnchkE332o920AHisSi5UJytnD4DPDuTHlXV6xzp8Ki8BU7bWp8gOyOm3i8DBgIGK72AoMQ6FmG74aStndF4rC0nc0Ig3mOyYKjeykQf7214BPytW90cLWdUvWGVsRMBuOoKwKxgIvEU1xABQnCpKtQ2T5HG47p8jn7qnkxkwJWw2P4Hi6B4J1JDXsHmVVivcHU9Qt2Sv2fAzOQyxxl2XoDmxrW7Ob4J8xcV6Duw3tgp84wxwmpuwsb0LLIWvu6Flziqw8hXrUJ7IeDH4kgifYtzFe4pk5E7dcEb3ByI4vzZzN8IfJ76yVZVSaXpemxBk7gZeie5tHnLqRT0mhZXNeoVKByWJeWy4wI4o1Fsbo4ZFzldAxjZWf2d8eOqfv3ROcxY9eL2C2kDmAiCEGc0mmmLrK4xM4cin1DrPWrEQqY1Np2BRYToFeEmG2F8ohLpSXa3KBGkrHkBgzkswrWSaEIbGbWv77lV61E1e8z6rJWnOlz8hPKZhO1ezWQBCiOIebrlJwVabanYctVZ9xrpXb2J3oUMuFJL1lsFRMgwggRta2AadaIRZcfN5TgcLabxBAutxgZM16esUVbRQDPaPS5td7w0eYjhzogGR7nUMaAPLzA3XOmJ4YeMGTEJ4KXukFyPs6ggnMpdR7CRbKlr8isdMzdqfPmwbNjP8jhZ5q4iAbhE3XQPHVL1plbOS0ibD9UE0iLg7ib0ao

@bdmorin
bdmorin / readme.md
Created May 15, 2024 22:28
Very basic and not polished way to grab end of day news and summarize.

So I was reading https://fedi.simonwillison.net/@simon blog post https://simonwillison.net/2023/May/18/cli-tools-for-llms/

He had a neat workflow to summarize web pages.

So I extended it, and used pup and strip-tags to get the frontpage links from the Drudge Retort (NOT DRUDGE REPORT), processed all the links through curl and use 4o to summarize them. THen I summarized the summaries, and I get a quick hit read of what happened today. Kinda like WTFJHT.

# Create a file to store all summaries
echo -n "" > all_summaries.txt
from newspaper import Article
import markdownify
def extract_article(url):
article = Article(url)
article.download()
article.parse()
return article.text
def convert_to_markdown(html_content):
@bdmorin
bdmorin / vizio.md
Last active April 23, 2024 03:35
vizio fuckery
> ssh-audit 10.0.0.74
# general
(gen) banner: SSH-2.0-dropbear_2016.74
(gen) software: Dropbear SSH 2016.74
(gen) compatibility: OpenSSH 7.3+ (some functionality from 6.6), Dropbear SSH 2016.73+ (some functionality from 2014.66)
(gen) compression: disabled

# security
(cve) CVE-2018-15599                 -- (CVSSv2: 5.0) remote users may enumerate users on the system