Skip to content

Instantly share code, notes, and snippets.

@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 May 13, 2024 22:21
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 May 20, 2024 23: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
@radekkozak
radekkozak / obsidian_to_marked_wikilink_preprocessor.rb
Last active September 2, 2022 21:58
Obsidian [[WikiLinks|with aliases]] preprocessor for Marked app
@onlurking
onlurking / programming-as-theory-building.md
Last active May 25, 2024 15:28
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct