Skip to content

Instantly share code, notes, and snippets.

@myrfy001
myrfy001 / Highlight DOM elements (include sub DOM) when mouse hover over it in Chrome or Firefox using devTools.md
Created May 14, 2018 02:59
Highlight DOM elements (include sub DOM) when mouse hover over it in Chrome or Firefox using DevTools

Paste the following code into the console panel of the DevTools window of Chrome or Firefox.

The style sheet came from (Web Scraper)[http://webscraper.io/] plugin for Chrome

It is useful for analyse a page layout and you can extend it to select preferred dom elements.

function addStyleString(str) {
    var node = document.createElement('style');
@evsar3
evsar3 / hexdump.ts
Created October 4, 2023 17:03
HexDump for TypeScript/Javascript
function hexdump (data: Uint8Array, bytesPerLine = 16): string {
const result: string[] = []
for (let i = 0; i < data.length; i += bytesPerLine) {
const chunk = data.slice(i, i + bytesPerLine)
const address = i.toString(16)
.padStart(8, '0')
const hex = Array.from(chunk, byte => byte.toString(16)
@GregLando113
GregLando113 / random IDAPython functions.py
Created April 15, 2022 12:55
stuff to take advantage of classinformer, label all functions and find likely constructors for all RTTI types
import idaapi
import idautils
import ida_funcs
import ida_allins
import ida_ua
import ctypes as C
NETNODE_NAME = '$ClassInformer_node'
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.

@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@webketje
webketje / README.md
Last active May 12, 2024 14:24
Notepad++ extension: "Open Folder as workspace" context menu entry

Notepad++ extension: "Open Folder as workspace" context menu entry

Adds a context menu entry upon right-clicking folders to open the folder as a clean workspace in Notepad++, like many other modern editors allow.
Requires Notepad++ 7.8 or higher.

Screenshot

Install

Run install.cmd as administrator, or open regedit and manually import the .reg file.

## Sep 2023 update: We've released official support for MediaPipe on Raspberry Pi.
## It provides many more features to what's available in TFLite Task Library. The guide
## below has been updated to use MediaPipe instead of TFLite Task Library.
## Check out this blog post to learn more:
## https://developers.googleblog.com/2023/08/mediapipe-for-raspberry-pi-and-ios.html
# Show your Raspberry Pi OS version.
cat /etc/os-release
# Update packages on your Raspberry Pi OS.
@jahirfiquitiva
jahirfiquitiva / settings.json
Created May 11, 2024 22:32
VS Code Settings
{
"breadcrumbs.enabled": false,
"editor.fontFamily": "'MonoLisa', 'Dank Mono', 'Operator Mono Lig', 'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "400",
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.stickyScroll.enabled": true,
"explorer.sortOrder": "type",
"workbench.editor.enablePreview": false,
"workbench.editor.highlightModifiedTabs": true,
@angelo-v
angelo-v / jwt-decode.sh
Last active May 12, 2024 14:20
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@rutcreate
rutcreate / README.md
Last active May 12, 2024 14:20
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository