Skip to content

Instantly share code, notes, and snippets.

View dleslie's full-sized avatar

Dan Leslie dleslie

View GitHub Profile
@feilen
feilen / stable.md
Created September 1, 2023 07:47
Using Stable Diffusion to add Albedo texture variation

Tiled textures are a fantastic way to spread a little memory around widely, but they often come with a rather noticable lack of variation.

Using this method you can add a lot of variation to a preexisting material, leveraging Stable Diffusion.

I'll be using this map:

image

Create a tiled map

@drewc
drewc / gist:5f260537b7914a2b999c8a539fb48098
Last active October 6, 2023 20:10
gerbil-swank for wiki?
━━━━━━━━━━━━━━━━━━━━━━━━━
I LOVE A SLIME'Y SWANK!
Drew Crampsie
━━━━━━━━━━━━━━━━━━━━━━━━━
Table of Contents
─────────────────
@onigetoc
onigetoc / IPTV-big-list.m3u
Last active April 15, 2024 16:20
IPTV big list.m3u
#EXTM3U
#EXTINF:0 tvg-name="Newsmax TV" tvg-language="English" tvg-country="CA" tvg-id="Newsmax-TV" tvg-logo="https://i.imgur.com/Twkovic.gif" group-title="Entertainment",Newsmax TV
https://nmxlive.akamaized.net/hls/live/529965/Live_1/index.m3u8
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars1" tvg-id="Infowars1" group-title="News",Infowars Live1
https://infostream.secure.footprint.net/hls-live/infostream-infostream/_definst_/master.m3u8
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars" tvg-id="Infowars" group-title="News",Infowars Live 2
https://infowarslive-lh.akamaihd.net/i/infowarsevent_1@366809/master.m3u8
#EXTINF:0 tvg-name="Russia today News" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT News
https://rt-news-gd.secure2.footprint.net/1103.m3u8
#EXTINF:0 tvg-name="Russia today USA" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT USA
@joeheyming
joeheyming / breaktime.el
Last active August 25, 2015 23:18 — forked from camdez/breaktime.el
/u/joeheyming's Emacs break timer (modified)
;;; See: https://www.reddit.com/r/emacs/comments/3icpo7/take_a_break_every_3_hours/
(defvar breaktime-timer nil
"Holds the running break timer (if any).")
(defvar breaktime-wait "3 hours"
"How long to wait for the next break.")
(defun breaktime--set-next-breaktime ()
"If we kill a breaktime buffer, set another wait timeout"
(when (string= (buffer-name) "*breaktime*")
(setq breaktime-timer (run-at-time breaktime-wait nil 'breaktime--take-a-break))))
(defun override-theme (arg)
"Disables all enabled themes and then loads the provided theme."
(interactive
(list
(intern (completing-read "Load custom theme: "
(mapcar 'symbol-name (custom-available-themes))))))
(while custom-enabled-themes
(disable-theme (car custom-enabled-themes)))
(load-theme arg t))
@dleslie
dleslie / font-lock-keywords.el
Created February 25, 2012 22:29
Easy add/remove keywords from font lock
(defun add-font-lock-keywords (modes new-keywords)
(mapc (lambda (mode)
(font-lock-add-keywords mode `((, (concat "(\\(" (regexp-opt (mapcar 'symbol-name (remove-if 'numberp new-keywords)) t) "\\)\\>")
(1 font-lock-keyword-face)))))
modes)
t)
(defun remove-font-lock-keywords (modes new-keywords)
(mapc (lambda (mode)
(font-lock-remove-keywords mode `((, (concat "(\\(" (regexp-opt (mapcar 'symbol-name (remove-if 'numberp new-keywords)) t) "\\)\\>")
@dleslie
dleslie / getmp3
Created December 12, 2011 00:25
wget converter from flac to mp3
#!/bin/bash
for link in `cat list.txt`; do
fname=`echo $link | awk -F"/" '{print $5}'`
wget -c --limit-rate=500k $link -qO - | flac -cd - | lame -h - "$fname.mp3"
sleep 120
done