Skip to content

Instantly share code, notes, and snippets.

View pelgerr's full-sized avatar

Rob Pelger pelgerr

View GitHub Profile
@KonnorRogers
KonnorRogers / testing-dragonruby-web-builds.md
Created January 26, 2025 18:53
Testing Dragonruby web builds
@amirrajan
amirrajan / init.el
Last active September 26, 2024 17:47
Emacs minimal init.el for Mac (evil and magit only)
(require 'package)
;; Emacs has an official repository of packages and a more current
;; unofficial one. Melpa is the 'unoffical one' (which in this
;; case translates to more up to date, newer, and by extension,
;; a bit more volatile). The official repo is called org. This
;; repo is slow changing and extremely stable (but doesn't have
;; all the cool/cutting edge packages that are being used).
(push '("melpa" . "http://melpa.org/packages/") package-archives)
(push '("org" . "http://orgmode.org/elpa/") package-archives)
@amirrajan
amirrajan / 01-init.el
Last active January 20, 2024 00:59
Emacs step by step
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.
;; This is a import that ships with emacs.
;; package is Emacs's package manager.
(require 'package)
;; Emacs has an official repository of packages and a more current
;; unofficial one. Melpa is the 'unoffical one' (which in this
;; case translates to more up to date, newer, and by extension,
;; a bit more volatile). The official repo is called org. This
anonymous
anonymous / gist:da39eeadddb488c39c1263975538ffc5
Created February 4, 2018 05:48
Water Version 3
#Basic equasion, I do it this way to increase reliablity because I trust JavaScript's date parsing more than writing a regex against nightbot.
$(eval Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));)
#Version 1, repeats the math multiple times
@mellana You've been live for just over $(eval Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));) hours. By this point in your broadcast you should have consumed at least $(eval 4*Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));)oz ($(eval 120*Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60));)mL) of water to maintain optimum hydration.
#Version 2, builds string in Javascript, but only does math once!
$(eval const hours = Math.trunc((Date.now()- Date.parse('$(twitch mellana "{{uptimeAt}}")'))/(1000*60*60)); "@mellana You've been live for just over " + hours + " hours. By this point in your broadcast you should have consum
@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC