Skip to content

Instantly share code, notes, and snippets.

@SkyzohKey
SkyzohKey / screen-spoofer.user.js
Last active June 4, 2024 10:23
~ Spoof the reported window.screen as the most common one so that it can't be used to fingerprint browser.
// ==UserScript==
// @name Spoof screen resolution & color depth
// @namespace https://skyzohlabs.be
// @version 1.0.5
// @description Spoof the reported window.screen as the most common one so that it can't be used to fingerprint browser.
// @author SkyzohKey
// @include http://*
// @include https://*
// @run-at document-end
// @grant none
@eigengrau
eigengrau / firefox-to-org.py
Last active May 11, 2024 16:48
Export Firefox bookmarks to org-mode
#!/usr/bin/env python
# Read a Mozilla places JSON-structure from STDIN and create a directory
# hierarchy of org-mode files containing bookmarks.
# Copyright (c) 2014 Alexey Kutepov a.k.a. rexim
# Copyright (c) 2016 Sebastian Reuße
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
@corny
corny / lua-udp.lua
Created July 4, 2016 16:08
Lua UDP example
#!/usr/bin/env lua5.2
--
-- apt install lua5.2 lua-socket
--
local socket = require("socket")
local udp = assert(socket.udp())
local data
udp:settimeout(1)
@mutability
mutability / OVERLAYFS
Last active January 9, 2025 12:26
readonly root via overlayfs
- install the two shellscripts into the appropriate places under /etc/initramfs-tools
- run update-initramfs
- put "overlay=yes" on the kernel command line
- reboot
With the overlay in place, the real root is mounted readonly on /ro.
Only the root fs is changed, other filesystems are mounted normally.
Remove "overlay=yes" (or change it to something other than yes) and reboot to go back to readwrite.
(This probably means that you want the commandline config to live somewhere other than on the root fs, e.g. under /boot)
@0xBADCA7
0xBADCA7 / cors_http_reply.txt
Created December 31, 2015 00:00
A stub for HTTP 200 reply with CORS headers. Useful for piping into netcat when XSS'ing. One reply is for the OPTIONS request.
HTTP/1.1 200 OK
Server: MSLC
Date: Sun, 28 Dec 2015 08:50:04 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Vary: Accept-Encoding
Status: 200 OK
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
@xfguo
xfguo / udp_client.lua
Created April 12, 2014 16:06
Added UDP server example powered by luaevent.
-- udp-client test
-- based on code from http://blog.chinaunix.net/uid-27194309-id-3499261.htmlEF
local socket = require "socket"
local address = "127.0.0.1"
local port = 8080
local udp = socket.udp()
udp:settimeout(0)
udp:setpeername(address, port)
@willurd
willurd / web-servers.md
Last active May 9, 2025 14:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@lkaczanowski
lkaczanowski / ILogExtensions.cs
Created August 20, 2012 09:46
ILog extension for TRACE and VERBOSE log4net levels
public static class ILogExtentions
{
private static readonly log4net.ILog log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public static void Trace(this ILog log, string message, Exception exception)
{
log.Logger.Log(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType,
log4net.Core.Level.Trace, message, exception);
javascript:var mapp={a:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ?!".split(""),b:"a\u0360 \u00fe\u030c \u00e7\u030c d\u0311\u0362 e\u0311\u035d f\u035b\u036a g\u036b\u0365\u0368\u0356\u0349 h\u0489 i\u0302\u0341\u0329 j\u036b\u034f\u0319\u0324 k\u036b\u034f l\u0302 m\u0367\u033e\u036c n \u0314\u0309o p\u200b\u0305\u036b\u034f\u0319\u0324 q\u200b\u0305\u036b\u034f r\u034e\u0329\u0331\u0354 s\u0489 \u2020 \u00b5 v\u035a\u0316\u0354\u035a\u0316\u0354\u035a\u0316\u0354 w\u035a\u0316\u0354 \u00d7\u0367\u033e\u036c \u00a5\u0367\u033e\u036c z\u0344\u0302\u0344 A\u0360\u0321\u034a\u035d B\u0340 C\u036d\u030f\u0365\u036e\u035f \u00d0 E\u0367\u033e\u036c\u035b\u036a\u0344 F\u032d\u032f\u0337\u0319\u0332\u031d\u0356 G\u0489 H\u0368\u034a\u033d\u0305\u033e\u030e\u0321\u0338\u032a\u032f | J\u0341\u0329 K\u0360 L\u0351 M\u034a\u0312 N\u0310 \u0398 \u0360P\u032f\u034d\u032d Q\u200b\u0305\u036b\u034f\u0319\u0324 R\u0364\u0342\u033e\u0306\u0318\u031d\u0319 $\u0364\u0342\u033e\u0306\u031d T\u0344\u0302\u0344 U\u031