Skip to content

Instantly share code, notes, and snippets.

View fastfingertips's full-sized avatar
🧶
knitting..

fastfingertips fastfingertips

🧶
knitting..
  • Istanbul
  • 20:43 (UTC +03:00)
View GitHub Profile

Crippling Facebook

Facebook works with advertisers to target you. These instructions are one of the many ways to begin crippling that relationship. When AI targeting is crippled, your psychosecurity improves :)

  1. On your desktop machine, goto https://accountscenter.facebook.com/ads/audience_based_advertising
  2. Maximize the browser window
  3. Press F12 and click on the Console tab
  4. Select the code below, copy it, paste it upon the Console line (The area next to the > character in the Console window), and press enter:
@SMUsamaShah
SMUsamaShah / Hacker_News_Story_Rank_Change_Indicator.user.js
Last active September 7, 2024 14:43
UserScript: Indicate New/Unread HN stories on front page since your last visit.
// ==UserScript==
// @name Hacker News Story Rank Change Indicator
// @namespace http://tampermonkey.net/
// @version 2024-09-07_15-42
// @description Indicate the new stories and stories moving up/down on the front page
// @author SMUsamaShah
// @match https://news.ycombinator.com/
// @match https://news.ycombinator.com/news
// @match https://news.ycombinator.com/news?p=*
// @match https://news.ycombinator.com/?p=*
@adtac
adtac / Dockerfile
Last active August 25, 2024 05:52
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@blackary
blackary / caching.py
Last active January 9, 2024 06:37
Caching Snowflake queries in Streamlit
def get_pandas_from_sql(sql: str) -> pd.DataFrame:
start = time.start()
with st.expander("Show the SQL query that generated this data"):
st.code(sql, language="sql")
@st.cache_data(ttl=TTL)
def get_df(sql):
dataframe = session.sql(sql).to_pandas()
@fastfingertips
fastfingertips / recycle_bin_manager.pyw
Last active August 17, 2023 11:39
This Python script lets you add or remove the Recycle Bin folder from the 'This PC' section on Windows by modifying the Windows Registry with the 'reg add' or 'reg delete' command. Use it with caution as changes to the Registry can have negative effects on the system.
import os
import sys
import ctypes
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QPushButton
def is_admin():
try: return ctypes.windll.shell32.IsUserAnAdmin()
except: return False
@TheBrokenRail
TheBrokenRail / README.md
Last active June 10, 2024 16:26
Jailbreak Firefox!

Jailbreak-Firefox

This script allows you to install unsigned extensions (ones that aren't approved by Mozilla) on normal Firefox builds and the official Snap! That's right, no "Firefox Developer Edition" nonsense required!

⚠️ Disclaimer ⚠️

This script is not well tested, like at all. This script might break things, possibly important things. You should probably take a backup of your Firefox profile before using it. You have been warned.

Dependencies

sudo apt install -y curl unzip zip
# Only needed when jailbreaking the Snap
@ace411
ace411 / scraper.cc
Created May 11, 2022 16:46
Web Scraping with C++
#include "iostream"
#include "string"
#include "algorithm"
#include "curl/curl.h"
#include "gumbo.h"
#include "string.h"
typedef size_t (*curl_write)(char *, size_t, size_t, std::string *);
std::string request(std::string word)
@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@fastfingertips
fastfingertips / wlan-details.ps1
Created March 10, 2022 12:46
lists saved wlan passwords
(netsh wlan show profiles) | Select-String \:(.+)$ | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=$name key=clear)} | Select-String Key Content\W+\:(.+)$ | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
@Meldiron
Meldiron / backup.sh
Last active August 27, 2024 02:59
Backup and Restore Appwrite, the lazy way 🐌
# Make sure to stop Appwrite before this backup,
# and make sure you have enough space on the machine.
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'.
# Also please check size of this file, it should be at least 5kb, even for small instances.
docker run --rm \
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \
-v appwrite_appwrite-redis:/backup/appwrite-redis \
-v appwrite_appwrite-cache:/backup/appwrite-cache \