Skip to content

Instantly share code, notes, and snippets.

@velzie
velzie / manifest-v2-chrome.md
Last active July 9, 2024 16:08
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@LiquidityC
LiquidityC / Makefile
Last active December 1, 2023 03:24
Generic drop in Makefile
VERSION = \"1.0.0\"
PREFIX ?= out
INCDIR = inc
SRCDIR = src
LANG = c
OBJDIR = .obj
MODULE = binary_name
CC = gcc
@hyperupcall
hyperupcall / settings.jsonc
Last active July 21, 2024 10:53
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
# STEP 1: Load
# Load documents using LangChain's DocumentLoaders
# This is from https://langchain.readthedocs.io/en/latest/modules/document_loaders/examples/csv.html
from langchain.document_loaders.csv_loader import CSVLoader
loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv')
data = loader.load()
@matthewdowney
matthewdowney / hack-captive-portal.bb
Created January 5, 2023 18:39
Script to bypass captive portals from https://miloserdov.org/?p=1088, ported to Babashka and improved
#!/usr/bin/env bb
; =========================================================================== ;
; FILE: hack-captive-portal.bb ;
; USAGE: sudo bb hack-captive-portal.bb ;
; ;
; DESCRIPTION: This script helps to pass through the captive portals in ;
; public Wi-Fi networks. It hijacks IP and MAC from somebody ;
; who is already connected and authorized on captive portal. ;
; Tested in Ubuntu 16.04 with different captive portals in ;
; airports and hotels all over the world. ;
@macshome
macshome / defang.md
Last active July 19, 2024 02:49
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@amansingh9097
amansingh9097 / my-linkedin-network.py
Created October 14, 2021 07:17
Visualize your LinkedIn connections
#!/usr/bin/env python
# coding: utf-8
# author: https://github.com/amansingh9097/
import pandas as pd
import numpy as np
import plotly.express as px
# How to get your connection data?
# On LinkedIn, Go to "Me" --> "Settings & Privacy" --> "Get a Copy of your Data"
@megclaypool
megclaypool / howto.md
Created September 14, 2021 23:21
[Open Obsidan vault files in Obsidian and other .md files in VS Code] [Make Obsidian a default app for Markdown files on macOS - Share & showcase - Obsidian Forum](https://forum.obsidian.md/t/make-obsidian-a-default-app-for-markdown-files-on-macos/

This is a simple guide that will teach you how to configure macOS to automatically open markdown files (e.g. when double clicking a file in Finder):

in Obsidian if the file is inside any of your Obsidian Vaults in other app of your choice (e.g. TextEdit or VSCode) if they are not in any Vault. Guide We are going to use default macOS tool Automator to create a trivial automation/application that will redirect the file you are trying to open into either Obsidian or other app of your choice.

Create a new Automator app Launch Automator.app. You will be presented with a file dialog: click New Document button.

#!/usr/bin/env ruby
#
# Recreate Lightroom catalog by replacing corrupt files with recovered copies
#
# Keeps the directory structure and creates the new catalog in a new path,
# which means you'll need at least 3x the size of your photos of free space.
#
# Dependencies:
# - ruby
# - exiftool