Skip to content

Instantly share code, notes, and snippets.

Avatar

Steve Losh sjl

View GitHub Profile
@sjl
sjl / fuckemojigarbageregex.txt
Created Oct 13, 2017
Tweetbot regex to mute emoji garbage. You're literate, use words.
View fuckemojigarbageregex.txt
[🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐸🐵🙊🙉🙊🐒🐔🐧🐦🐤🐣🐥🦆🦅🦉🦇🐺🐗🐴🦄🐝🐛🦋🐌🐚🐞🐜🕷🕸🐢🐍🦎🦂🦀🦑🐙🦐🐠🐟🐡🐬🦈🐳🐋🐊🐆🐅🐃🐂🐄🦌🐪🐫🐘🦏🦍🐎🐖🐐🐏🐑🐕🐩🐈🐓🦃🕊🐇🐁🐀🐿🐾🐉🐲🌵🎄🌲🌳🌴🌱🌿☘️🍀🎍🎋🍃🍂🍁🍄🌾💐🌷🌹🥀🌻🌼🌸🌺🌎🌍🌏🌕🌖🌗🌘🌑🌒🌓🌔🌚🌝🌞🌛🌜🌙💫⭐️🌟✨⚡️🔥💥☄️☀️🌤⛅️🌥🌦🌈☁️🌧⛈🌩🌨☃️⛄️❄️🌬💨🌪🌫🌊💧💦☔️😀😃😄😁😆😅😂🤣☺️😊😇🙂🙃😉😌😍😘😗😙😚😋😜😝😛🤑🤗🤓😎🤡🤠😏😒😞😔😟😕🙁☹️😣😖😫😩😤😠😡😶😐😑😯😦😧😮😲😵😳😱😨😰😢😥🤤😭😓😪😴🙄🤔🤥😬🤐🤢🤧😷🤒🤕😈👿👹👺💩👻💀☠️👽👾🤖🎃😺😸😹😻😼😽🙀😿😾👐🙌👏🙏🤝👍👎👊✊🤛🤜🤞✌️🤘👌👈👉👆👇☝️✋🤚🖐🖖👋🤙💪🖕✍️🤳💅🖖💄💋👄👅👂👃👣👁👀🗣👤👥👶👦👧👨👩👱‍♀️👱👴👵👲👳‍♀️👳👮‍♀️👮👷‍♀️👷💂‍♀️💂🕵️‍♀️🕵️👩‍⚕️👨‍⚕️👩‍🌾👨‍🌾👩‍🍳👨‍🍳👩‍🎓👨‍🎓👩‍🎤👨‍🎤👩‍🏫👨‍🏫👩‍🏭👨‍🏭👩‍💻👨‍💻👩‍💼👨‍💼👩‍🔧👨‍🔧👩‍🔬👨‍🔬👩‍🎨👨‍🎨👩‍🚒👨‍🚒👩‍✈️👨‍✈️👩‍🚀👨‍🚀👩‍⚖️👨‍⚖️🤶🎅👸🤴👰🤵👼🤰🙇‍♀️🙇💁💁‍♂️🙅🙅‍♂️🙆🙆‍♂️🙋🙋‍♂️🤦‍♀️🤦‍♂️🤷‍♀️🤷‍♂️🙎🙎‍♂️🙍🙍‍♂️💇💇‍♂️💆💆‍♂️🕴💃🕺👯👯‍♂️🚶‍♀️🚶🏃‍♀️🏃👫👭👬💑👩‍❤️‍👩👨‍❤️‍👨💏👩‍❤️‍💋‍👩👨‍❤️‍💋‍👨👪👨‍👩‍👧👨‍👩‍👧‍👦👨‍👩‍👦‍👦👨‍👩‍👧‍👧👩‍👩‍👦👩‍👩‍👧👩‍👩‍👧‍👦👩‍👩‍👦‍👦👩‍👩‍👧‍👧👨‍👨‍👦👨‍👨‍👧👨‍👨‍👧‍👦👨‍👨‍👦‍👦👨‍👨‍👧‍👧👩‍👦👩‍👧👩‍👧‍👦👩‍👦‍👦👩‍👧‍👧👨‍👦👨‍👧👨‍👧‍👦👨‍👦‍👦👨‍👧‍👧👚👕👖👔👗👙👘👠👡👢👞👟👒🎩🎓👑⛑🎒👝👛👜💼👓🕶🌂☂️🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🍒🍑🍍🥝🥑🍅🍆🥒🥕🌽🌶🥔🍠🌰🥜🍯🥐🍞🥖🧀🥚🍳🥓🥞🍤🍗🍖🍕🌭🍔🍟🥙🌮🌯🥗🥘🍝🍜🍲🍥🍣🍱🍛🍚🍙🍘🍢🍡🍧🍨🍦🍰🎂🍮🍭🍬🍫🍿🍩🍪🥛🍼☕️🍵🍶🍺🍻🥂🍷🥃🍸🍹🍾🥄🍴🍽❤️💛💚💙💜🖤💩🔥🎵🎶]
@sjl
sjl / 69.lisp
Created Oct 11, 2017
Project Euler #69 in uLisp (runnable on Ardunio Zero or Due)
View 69.lisp
(defun dividesp (n d)
(= n (* d (/ n d))))
(defun brute-force-prime-p (n)
(let ((d 3))
(loop (cond
((> (* d d) n) (return t))
((dividesp n d) (return nil))
(t (incf d 2))))))
@sjl
sjl / qudwr.markdown
Last active Jul 11, 2017
Caves of Qud: Skills taught via Water Ritual
View qudwr.markdown
Faction Skills
Antelopes none
Apes Conk
Arachnids Lunge
Baboons none
Baetyls ?
Barathrumites Tinkering I
Bears none
Beasts none
View early-coq
RATIO | KEY | DISPLAY NAME | VALUE | WEIGHT
28.0 | STEEL-POTTER'S-KNIFE | &Ysteel&y potter's knife | 28.0 | 1.0
28.0 | STEEL-BUTCHER-KNIFE | &Ysteel&y butcher knife | 28.0 | 1.0
20.0 | STEEL-KUKRI | &Ysteel&y kukri | 20.0 | 1.0
20.0 | STEEL-DAGGER | &Ysteel&y dagger | 20.0 | 1.0
20.0 | STEEL-UTILITY-KNIFE | &Ysteel&y utility knife | 20.0 | 1.0
12.0 | WORN-BURNOOSE | worn burnoose | 12.0 | 1.0
10.0 | DAGGER2 | iron dagger | 10.0 | 1.0
7.0 | STEEL-VINEREAPER | &Ysteel&y vinereaper | 35.0 | 5.0
6.666 | STEEL-SHORT-SWORD | &Ysteel&y short sword | 20.0 | 3.0
@sjl
sjl / qud-item-values
Last active Oct 29, 2020
Item values in Caves of Qud, sorted by value/weight ratio
View qud-item-values
PRICE/WEIGHT | ITEM-KEY | DISPLAY-NAME | PRICE | WEIGHT
10000.0 | HANDENUKE | &mHand-E-Nuke | 10000.0 | 1.0
3000.0 | TIMECUBE | &ctimecube | 3000.0 | 1.0
2265.0 | MENTAL-AGGREGATOR | mental aggregator | 2265.0 | 1.0
1135.0 | SHORT-SWORD8 | &rmetametal &Kshort sword | 1135.0 | 1.0
750.0 | GEOMAGNETIC-DISC | geomagnetic disc | 750.0 | 1.0
635.0 | DAGGER8 | &rmetametal dagger | 635.0 | 1.0
630.0 | SHORT-SW
View gist:3eb4c3b233d9fb143a55ac98f1f58ef4
Original from https://groups.google.com/forum/#!msg/comp.lang.lisp/9SKZ5YJUmBg/Fj05OZQomzIJ
Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!wupost!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!news.ecn.bgu.edu!anaxagoras.ils.nwu.edu!riesbeck
From: ries...@ils.nwu.edu (Chris Riesbeck)
Newsgroups: comp.lang.lisp
Subject: Re: Loop macro
Date: 1 Apr 1993 17:37:56 GMT
Organization: The Institute for the Learning Sciences
Lines: 149
Distribution: world
View basic.css
body { width: 600px; margin 50px auto 200px; }
View gui.lisp
(in-package :chip8.gui)
(named-readtables:in-readtable :qtools)
;;;; Config -------------------------------------------------------------------
(defparameter *current* nil)
(defparameter *scale* 8)
(defparameter *width* (* *scale* 64))
(defparameter *height* (* *scale* 32))
(defparameter *fps* 60)
View let-bail.lisp
(defmacro let-bail (bindings &rest body)
(if (null bindings)
`(progn ,@body)
(destructuring-bind ((&whole binding symbol value &optional return-value)
&rest more-bindings)
bindings
(if (eql symbol 'bail-when)
`(if ,value ,return-value (let-bail ,more-bindings ,@body))
`(let (,binding) (let-bail ,more-bindings ,@body))))))
View gist:16fac0bdb422e1fd1cc485ffbce6a0d5
><((°> abcl
Picked up _JAVA_OPTIONS: -Djava.awt.headless=true
Armed Bear Common Lisp 1.3.3
Java 1.8.0_25 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM
Low-level initialization completed in 0.247 seconds.
Startup completed in 1.202 seconds.
Loading /Users/sjl/.abclrc completed in 8.332 seconds.
Type ":help" for a list of available commands.