Skip to content

Instantly share code, notes, and snippets.

@pl77
pl77 / Hashes
Created February 4, 2021 18:31 — forked from ddouhine/Hashes
DES(Unix)
Example: IvS7aeT4NzQPM
Used in Linux and other similar OS.
Length: 13 characters.
Description: The first two characters are the salt (random characters; in our example the salt is the string "Iv"), then there follows the actual hash.
Notes: [1] [2]
Domain Cached Credentials
Example: Admin:b474d48cdfc4974d86ef4d24904cdd91
Used for caching passwords of Windows domain.
@pl77
pl77 / gist:b78077625b864275dd2ba38258dfe17c
Created March 10, 2020 21:46 — forked from chrisle/gist:2252209
CURL as GoogleBot 2.1
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@
@pl77
pl77 / tmux.md
Last active January 9, 2020 17:15 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

Prefix key

The default prefix is C-b. I'm going to assume that Ctrl-b is your prefix.

Sessions, windows, panes

Session is a set of windows, plus a notion of which window is current.

@pl77
pl77 / ImageHash.py
Last active May 22, 2024 19:08
old perceptual hashing algorithm.
# https://pypi.org/project/ImageHash/
from os import path, mkdir, sep, remove
from sys import exit, argv
from PIL import Image
import numpy
from struct import error as StructError
# import scipy.fftpack
@pl77
pl77 / archive_declarative.py
Created February 23, 2018 05:18
Internet Archive metadata schema attempt #1
import os
import sys
from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint, DateTime
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, relationship, scoped_session
from sqlalchemy import event
Base = declarative_base()
@pl77
pl77 / autoslide.py
Created December 1, 2017 21:20
A small script to automate Bodyslide mesh conversions from old Skyrim CBBE to new CBBE format.
from pywinauto.application import Application
from pywinauto.timings import TimeoutError
from pywinauto.findbestmatch import MatchError
from bs4 import BeautifulSoup
import os
import time
import json
def get_soup(filepath):
@pl77
pl77 / naweeknumcalc.py
Last active August 29, 2015 14:18
Calculate North American Week Number having Sunday as Day 1 and January 1 as Week 1
import calendar
import datetime
def usaweeknum(year, month, day):
"""North American week number for weeks beginning on a Sunday
Week 1 is week containing January 1
Week 1 contains any days from the end of the previous year
For example, years 2011 and 2016 contain 53 weeks