Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
***status goes here***

Winston (Winny) Weinert winny-

👋
***status goes here***
View GitHub Profile
View readability.py
#!/usr/bin/env python
"""Executes python-readability on current page and opens the summary
as new tab.
Depends on the python-readability package found at
https://github.com/buriy/python-readability .
Based off of
https://github.com/qutebrowser/qutebrowser/blob/master/misc/userscripts/readability
with fixes for various crashes and fixes URLs.
View h.hs
-- This works: ghc -o h h.hs && ./h
--
-- This does not work: ghci h.hs
-- Get the following error: ghc: <stdout>: hFlush: illegal operation (handle is closed)
import System.IO
main = do
putStrLn "hello world"
hClose stdout
View config.txt
;; Via
;; https://github.com/stumpwm/stumpwm/wiki/Tips-And-Tricks
(defun show-key-seq (key seq val)
(message (print-key-seq (reverse seq))))
(add-hook *key-press-hook* 'show-key-seq)
;; Via Ticks and Tricks (above)
(stumpwm:add-hook stumpwm:*destroy-window-hook*
#'(lambda (win) (stumpwm:repack-window-numbers)))
(defcommand toggle-show-keys () ()
View accounts.conf
[Personal]
source = imaps://winston%40ml1.net:evzc3zktk4x455jx@imap.fastmail.com:993
outgoing = smtp+plain://winston%40ml1.net:evzc3zktk4x455jx@smtp.fastmail.com:587
default = INBOX
smtp-starttls = yes
from = Winston Weinert <winston@ml1.net>
copy-to = Sent
[UWM]
source = imaps://weinertw%40uwm.edu:SeeYaLaterUWM%21@outlook.office365.com
View ping_servers.py
#!/home/winston/venv/ping_servers/bin/python
# pip3 install nbt mcstatus tabulate
"""
Ping servers in the servers.dat
Works on Mac, should work on Windows and Linux.
"""
View *dashboard*.txt
While any text editor can save your files, only Emacs can save your soul
View *Packages*.txt
0xc 20190219.117 available melpa Base conversion made easy
2048-game 20151026.1933 available melpa play 2048 in Emacs
4clojure 20131014.2207 available melpa Open and evaluate 4clojure.com questions
@ 20181225.1438 available melpa multiple-inheritance prototype-based objects DSL
a 20180907.953 available melpa Associative data structure functions
aa-edit-mode 20170119.320 available melpa Major mode for editing AA(S_JIS Art) and .mlt file
abc-mode 20171020.1019 available melpa Major mode for editing abc music files
abgaben 20171119.646 available melpa review and correct assignments received by mail
abl-mode 20190403.904 available melpa Python TDD minor mode
abs-mode 20190404.2304 available melpa Major mode for the modeling language Abs
View init.el
(defvar conf-portage-font-lock-keywords
'(("[ \t]+\\(-[0-9A-Za-z_-]+\\)" 1 diff-removed t)
("[ \t]+\\([0-9A-Za-z_+][0-9A-Za-z_-]+\\)" 1 diff-added t)))
(define-derived-mode conf-portage-mode conf-unix-mode "Conf[Portage]"
"Conf Mode starter for Portage files"
(conf-mode-initialize "#" 'conf-portage-font-lock-keywords))
View .xbindkeys.scm
(define (path-join . args) (string-join args "/"))
(define HOME (getenv "HOME"))
;;(define raise-volume "amixer -c 0 sset 'Master',0 2dB+")
;;(define lower-volume "amixer -c 0 sset 'Master',0 2dB-")
;;(define mute "amixer set Master toggle")
(define raise-volume "ponymix increase 5")
(define lower-volume "ponymix decrease 5")
(define mute "ponymix toggle")
;; Quick and easy intel backlight adjustment. Does not call