Skip to content

Instantly share code, notes, and snippets.

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

fastfingertips fastfingertips

🧶
knitting..
  • Istanbul
  • 10:34 (UTC +03:00)
View GitHub Profile
@rmtbb
rmtbb / ChatGPT Canvas HTML Renderer from Clipboard.url
Last active October 15, 2024 01:59
Bookmarklet that lets you render a full HTML page with any included css and javascript that is currently copied to your clipboard. Also works for SVG code. Useful with ChatGPT Canvas
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard

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 November 5, 2024 21:05
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 November 1, 2024 03:05
#!/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