Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 17:30
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@Te-k
Te-k / pdf_metadata.md
Created November 26, 2020 10:31
How to remove metadata from PDFs

Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.

While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.

There are several options to remove PDF metadata safely:

Option 1 : Exiftool with qpdf

  • Remove metadata with exiftool : exiftool -all= some.pdf
  • Then remove ununsed objects with qpdf : qpdf --linearize some.pdf - > some.cleaned.pdf
@iheartmedia-matt
iheartmedia-matt / .htaccess
Created August 15, 2018 14:46
Apache .htaccess SSL React Router
<ifModule mod_rewrite.c>
#######################################################################
# GENERAL #
#######################################################################
# Make apache follow sym links to files
Options +FollowSymLinks
# If somebody opens a folder, hide all files from the resulting folder list
@henrik242
henrik242 / Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts.md
Last active March 28, 2024 17:25
Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts
@danielbachhuber
danielbachhuber / wordpress-language-codes.csv
Created April 24, 2020 12:35
Language / locale codes used in WordPress
language english_name native_name
af Afrikaans Afrikaans
ar Arabic العربية
ary Moroccan Arabic العربية المغربية
as Assamese অসমীয়া
az Azerbaijani Azərbaycan dili
azb South Azerbaijani گؤنئی آذربایجان
bel Belarusian Беларуская мова
bg_BG Bulgarian Български
bn_BD Bengali (Bangladesh) বাংলা
@iamaddy
iamaddy / upload.js
Last active March 28, 2024 17:25
ajax upload base64 image
function dataURItoBlob(dataURI) {
var byteString = atob(dataURI.split(',')[1]);
var ab = new ArrayBuffer(byteString.length);
var ia = new Uint8Array(ab);
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
return new Blob([ab], { type: 'image/jpeg' });
}
function supportFile (){
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 17:24
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active March 28, 2024 17:21
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?