Skip to content

Instantly share code, notes, and snippets.

View david-wm-sanders's full-sized avatar
🖋️
up late

David Sanders david-wm-sanders

🖋️
up late
View GitHub Profile
"*":
core:
customFileTypes:
"text.html.jinja": [
"html"
]
...
...
@almeidx
almeidx / markdown-text-101.md
Last active June 2, 2024 19:46 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@joncutrer
joncutrer / scapy-dhcp-listener.py
Last active July 4, 2023 19:55
This script listens for DHCP packets using scapy to learn when LAN hosts request IP addresses from DHCP Servers. Learn more about this script at https://jcutrer.com/python/scapy-dhcp-listener
#!/usr/bin/env python3
"""scapy-dhcp-listener.py
Listen for DHCP packets using scapy to learn when LAN
hosts request IP addresses from DHCP Servers.
Copyright (C) 2018 Jonathan Cutrer
License Dual MIT, 0BSD
@UltraWelfare
UltraWelfare / meancolor.py
Last active December 14, 2018 20:02
Grab mean color of screen in python instantly
import mss
from PIL import Image, ImageStat
# From what monitor to take screenshot
monitor_index = 0
def get_color(rescale=(0, 0)):
# Returns a list with the RGBA values.
# Add a rescale tuple parameter (x,y) other than 0,0 to make faster calculations
@david-wm-sanders
david-wm-sanders / !!.fish
Created October 29, 2018 12:03
Re-run the last command with sudo in fish shell
function !!
eval sudo $history[1]
end
@seanh
seanh / html_tags_you_can_use_on_github.md
Last active April 18, 2025 12:19
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@giansalex
giansalex / docker-php-ext-install.md
Last active October 13, 2024 20:15
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
Section "Monitor"
Identifier "Virtual1"
Modeline "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
Option "PreferredMode" "2560x1440_60.00"
EndSection
Section "Device"
Identifier "vmwarescreen"
Driver "vmware"
EndSection
@dbirks
dbirks / change-last-logged-on-user-windows-10.md
Last active January 25, 2025 13:03
Change last logged on user on Windows 10

In Windows 10 you can no longer change the last logged on user in the registry like you could in Windows 7. Windows 10 requires the user's SID to be entered as well. Here's an updated guide.

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI, you'll want to change 4 entries:

  • LastLoggedOnDisplayName
    • Enter the user's full name, like Allan Jude
  • LastLoggedOnSAMUser
    • Enter the username, like SHORTDOMAIN\allan.jude
  • LastLoggedOnUser
  • Enter the username again, like SHORTDOMAIN\allan.jude
@david-wm-sanders
david-wm-sanders / pipfreeze
Created September 4, 2017 01:20
Powershell Command to pip freeze properly
.\venv\Scripts\pip freeze | Out-File -Encoding UTF8 requirements.txt