Skip to content

Instantly share code, notes, and snippets.

@AgentOak
AgentOak / youtube_formats.md
Last active May 3, 2024 20:19
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@JesseCrocker
JesseCrocker / merge-pmtiles.py
Created March 29, 2024 13:19
Merge a directory of PMTiles files into a single file
#!/usr/bin/env python3
import argparse
import os
from pmtiles.reader import MmapSource, Reader, all_tiles
from pmtiles.writer import Writer
from pmtiles.tile import Compression
from pmtiles.tile import zxy_to_tileid
from tqdm import tqdm
def merge_pmtiles(input_dir: str, output_file: str) -> None:
@rishitells
rishitells / Jest_GitLab_CI.md
Last active May 3, 2024 20:18
Setting up Jest tests and coverage in GitLab CI

Configuring Jest Tests in GitLab CI

1. Add GitLab CI configuration file in the root

In the root of your project, add .gitlab-ci.yml with the configuration below.

image: node:latest

stages:
@disler
disler / ADA_v2_README.md
Created April 17, 2024 18:01
Personal AI Assistant: 'Ada' - v0.2

This is not working complete code.

This is strictly a v0.2, scrapy, proof of concept version of a personal AI Assistant working end to end in just ~726 LOC.

This is the second iteration showcasing the two-way prompt aka multi-step human in the loop. The initial, v0, assistant version is here.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active May 3, 2024 20:14
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
@ruario
ruario / small-slackware.md
Last active May 3, 2024 20:15
A short guide to quickly setting up a small Slackware install

Setting up a "small" Slackware install

Intro

Before you do this, reconsider if it is really needed. More often than not, it isn't. This is why.

A common reason for attempting a minimal install is an expectation that Slackware will run faster. This is not true. Some example, (IMHO) valid, reasons for stripping back the install include:

  • Installing on a device with limited disk space, where it is hard to add additional storage
  • A setup where there is an ongoing cost to rent disk space (e.g. a Virtual Private Server)

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@matzegebbe
matzegebbe / clean_docker_nexus.sh
Last active May 3, 2024 20:07
Nexus Repository Manager keep the last X docker images delete all other
#!/bin/bash
REPO_URL="https://repository.xxx.net/repository/"
USER="admin"
PASSWORD="datpassword"
BUCKET="portal-docker"
KEEP_IMAGES=10
IMAGES=$(curl --silent -X GET -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -u ${USER}:${PASSWORD} "${REPO_URL}${BUCKET}/v2/_catalog" | jq .repositories | jq -r '.[]' )
@coaxial
coaxial / README.md
Last active May 3, 2024 20:06
unpinning SSL certs on Android apps with Frida to inspect network traffic with mitmproxy

Most of the time, applications won't pin the certificate. Running mitmproxy and passing all Android traffic through it is as simple as adb connect <IP> && adb shell settings put global http_proxy <mitmproxy host>:<mitmproxy port> (or use Android's UI)

Some applications, however, pin the certificate and will refuse to do any network calls if using mitmproxy.

Luckily, Frida is here!

This assumes Android x86 is running in a VM, that you are a developer in Android (tap the build version enough times), adb debugging is enabled, and that android tools are installed on the host.

  • start mitmproxy on host
  • visit mitm.it on the target (after setting the proxy) and install the spoofed cert
@jl2
jl2 / mkhelix.py
Created May 15, 2012 19:31
Python script using CATIA's COM interface to create a product structure containing 200 cubes arranged in a helix.
#!/usr/bin/env python3
import sys
import array
import math
import random
import os.path
import win32com.client
def get_catia():