Skip to content

Instantly share code, notes, and snippets.

View roycewilliams's full-sized avatar
💭
:cheeeeeese:

Royce Williams roycewilliams

💭
:cheeeeeese:
View GitHub Profile
@Dan-Q
Dan-Q / _no_code_page_.php
Last active May 3, 2024 08:46
Hacky PHP to produce a "blank" web page which somehow has content when viewed in Firefox. Sample page at https://danq.me/wp-content/no-code-webpage/, explanation at https://danq.me/nocode
<?php
// half-hearted CSS minification
$css = preg_replace(
array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'),
array('$1{ ','$1$3;',"",'} '),
file_get_contents('linked.css')
);
// embed as a data: uri
$base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '=');
@bramus
bramus / bookmarklet.md
Last active August 3, 2023 16:56
Mastodon User Page Bookmarklet
@pcantrell
pcantrell / mastodon-macos.css
Last active December 8, 2023 20:35
Stylesheet to make Mastodon more macOS-like
body.app-body.layout-multiple-columns.theme-mastodon-light,
body.app-body.layout-multiple-columns.theme-default,
body.app-body.layout-multiple-columns.theme-contrast {
overflow: hidden !important;
}
body.app-body.layout-multiple-columns.theme-mastodon-light .columns-area,
body.app-body.layout-multiple-columns.theme-default .columns-area,
body.app-body.layout-multiple-columns.theme-contrast .columns-area {
margin: 0 -1px !important;
@VyrCossont
VyrCossont / mastodon-advanced-search.md
Last active January 27, 2023 03:43
filter by users and sort by date in Mastodon. see https://demon.social/@vyr/109296080568061011

new search features

  • setting SEARCH_ALL_VISIBLE_TOOTS=true in your instance config will let users search all non-private posts, not just the ones they've interacted with.
  • prefixing a search query with 🔍 will use ES simple query string syntax instead of Mastodon's weird broken subset of it, which will let you use "double quotes" for literal strings including white space, + to force a term to be included, or - to force a term to be excluded.
  • prefixing a search query with 🔎 will use ES regular query string syntax which is like simple query syntax, except:
    • syntax errors will cause the search to fail, so if you don't get anything back, that's why.
  • you can specify individual fields to match on. if you don't specify a field for a given search term, it does a normal full-text search for
Image Package Dependency
adminer-4.8.0 libcrypto1.1 openssl 1.1.1k-r0
adminer-4.8.0 libssl1.1 openssl 1.1.1k-r0
adminer-4.8.0 openssl openssl 1.1.1k-r0
adminer-4.8.0-fastcgi libcrypto1.1 openssl 1.1.1k-r0
adminer-4.8.0-fastcgi libssl1.1 openssl 1.1.1k-r0
adminer-4.8.0-fastcgi openssl openssl 1.1.1k-r0
adminer-4.8.0-standalone libcrypto1.1 openssl 1.1.1k-r0
adminer-4.8.0-standalone libssl1.1 openssl 1.1.1k-r0
adminer-4.8.0-standalone openssl openssl 1.1.1k-r0
@hrbrmstr
hrbrmstr / kev2rss.R
Created October 30, 2022 11:09
Turn CISA's KEV JSON into a bare-bones RSS feed
#!/usr/bin/Rscript
kev <- jsonlite::fromJSON("https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json")
vulns <- kev$vulnerabilities
vulns <- vulns[nrow(vulns):1,]
rss_body <- '
<rss version="2.0">
<channel>
10stockstobuy.com
50centforums.com
aberdeentea.com
abvifoley.com
abyage.com
acceptdegree.com
accordcareer.com
accountstables.com
acheaptownj.com
actshopfade.com
@Chick3nman
Chick3nman / RTX_4090_v6.2.6.Benchmark
Created October 14, 2022 00:07
Hashcat v6.2.6 benchmark on the Nvidia RTX 4090
NVIDIA Driver Version: 522.25 CUDA Version: 11.8
Credit: blazer
For benchmarking the card and allowing me to release the benchmarks here
The hashcat installation used includes a change to the tuning ALIAS.hctune file to include the RTX 4090 as "ALIAS_nv_sm50_or_higher".
The "Kernel exec timeout" warning is cosmetic and does not affect the speed of any of the benchmarked modes.
Benchmark was run at stock clocks on an Asus Strix 4090.
import os
import numbers
import binascii
from struct import pack, unpack
from twisted.internet import abstract, interfaces, reactor, fdesc, task
KEYCODES = {
"\n": (0x28, 0),
@atoponce
atoponce / metal-classifications.md
Last active April 5, 2023 12:16
Table of base metallic elements and some classifications

Naturally occurring metals

Some standard classifications are as follows, with a table breakdown for easy cross-reference:

  1. Radioactive: Excess energy emitting gamma radian, alpha or beta particles from the nucleus. All chemical elements can exist as radioactive, but the ones in this list are primordial.
  2. Noble: Resistant to corrosion and usually found in nature in its raw form.
  3. Platinum: Subgroup of noble metals. Many useful properties depending on the metal from electronics, to biology, jewelry, and autocatalysts. Resistant to wear and tarnish, resistant to chemical attack, high temperature durability, high mechanical strength, and stable electrical properties. Useful also in anticancer drugs and dentistry. Converts carbon monoxide into less harmful greenhouse gas emissions.
  4. Refactory: High melting points (