Skip to content

Instantly share code, notes, and snippets.

@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@jauderho
jauderho / gist:67ff70804f21d88bd66e69d84e5d8783
Last active June 29, 2024 20:26
HOWTO: Switch OpenWrt from using wolfssl to mbedtls manually (22.03 to 23.05)
#!/bin/sh
#
# from https://forum.openwrt.org/t/openwrt-23-05-0-rc1-first-release-candidate/162544/27
#
# auc will not work as-is to upgrade from 22.03 to 23.05 due to the mbedtls switch
# therefore, we need to first switch from wolfssl to mbedtls while on 22.03 before using auc
#
cd /root || exit
opkg update
/**
* This sketch connects an AirGradient DIY sensor to a WiFi network, and sends
* these metrics via MQTT. Adapted from original by Jeff Geerling.
*/
#include <AirGradient.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PubSubClient.h>

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@MarkDana
MarkDana / m1-max-numpy-setup.md
Last active October 28, 2023 11:42
Install NumPy on M1 Max

How to install numpy on M1 Max, with the most accelerated performance (Apple's vecLib)? Here's the answer as of Dec 6 2021.


Steps

I. Install miniforge

So that your Python is run natively on arm64, not translated via Rosseta.

  1. Download Miniforge3-MacOSX-arm64.sh, then
  2. Run the script, then open another shell
$ bash Miniforge3-MacOSX-arm64.sh
@otherjoel
otherjoel / spf-fail.rkt
Last active June 29, 2024 12:37
Generate a form email to explain to someone at another company that their SPF is broken
#lang racket/base
;; Generate a form email to let someone know their SPF records are misconfigured for their current email provider.
;;
;; Run (fill-report "domain.com" "1.2.3.4") where the 2nd arg is the sending email server's IP address.
;; It will copy the completed report to the clipboard for you.
;; Only works on Windows for now.
(require net/dns
@Tugzrida
Tugzrida / mta-sts.js
Last active May 31, 2024 06:56
MTA-STS Cloudflare worker
// This worker is designed to be able to neatly handle MTA-STS policies for multiple domains.
// Make a new worker with this script and add your domains to the stsPolicies dict like the example.
// Add a DNS AAAA record for mta-sts.yourdomain.com pointing to 100:: and set to proxied,
// then add a workers route for mta-sts.yourdomain.com/* pointing to this worker.
// You should probably also create a Cloudflare configuration rule disabling Browser Integrity Check for the mta-sts subdomain
// to ensure MTAs aren't blocked from retrieving your policy.
// You'll still need to manually add the appropriate _mta-sts.yourdomain.com TXT record to enable the policy,
@ACK-J
ACK-J / metrix_block.py
Last active July 17, 2023 20:03
Find all the domains ThreatMetrix is using to exfil user tracking data
from shodan import Shodan
api = Shodan('API-KEY')
results = api.search('isp:"ThreatMetrix Inc." port:443 Bad Request')
for banner in results['matches']:
# Only care about services that use SSL
if 'ssl' in banner:
print(banner['ssl']['cert']['subject']['CN'])
@lg
lg / adding-tailscale-to-edgerouter.md
Last active April 11, 2024 07:44
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@alexf101
alexf101 / generate_dependabot_config.rb
Last active April 23, 2024 23:27
Translates a Dependabot config with glob support to a real Dependabot config
#!/usr/bin/env ruby
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'httparty'
gem 'fast_ignore'
end
require 'httparty'