Skip to content

Instantly share code, notes, and snippets.

Clarence "Sparr" Risher sparr

Block or report user

Report or block sparr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a05391fe99f1fe3d5c7097637c101679
0eNqlne1umzkOhe/Fv5OFJOqzt7IYDNoZb9dAmgSOs5iiyL2v0zrdxVRvfPjoV9EmPeJLiRRFUkffdp/unvePx8P9affh2+7wx8P90+7DP7/tng6f7z/evf7b6evjfvdhdzjtv+xudvcfv7z+bf/X43H/9HR7On68f3p8OJ5uP+3vTruXm93h/s/9X7sP8eW3m93+/nQ4HfY/EL//5evv989fPu2P51+4hnWze3x4Ov/3h/tXKc6Qt7Hc7L6e/2znYf48HPd//Phhfrn5BT39gv58luv4+fhw/nMTP0/x682bDh6eT4/Pr1/5y3gGvsZ+jNavf03m6H/7ljRBLwA9TWWvE/T6C/rT493hdDr/bBu3/qP8Te7XhXXW/e/npfpwPOOf8Y6Hz/+eTkZDkx+vTP738WfDdaC/KOtvuPQXLh/xd/3NkF9/2a+ngW0kApPvssXH5Ecf8ixEw7Ir6MDAq45eMHoT0F0G3jzrs/nlLrpWgNlmHX1g2QWdJ2S5mTq4FMlw8+1NcRQJmHLSQwNgyqZPTQa6Cv+Dv66cgnY37LVTdasrTGd+Fnokv4lHHbxTcCFoSn4DT7LkFii4ILn5t2HTJU8UXJHcb7lZlzxTcMHnGDHaSv21VT5a94/mt2H9HGedggvHKhtATx1va9lv1V3ed3J0hGGeKCz7LToGOU7KfpMeuk4yBVfO5P6o2nFqzhWjt5cZXnMsj7fT6ewU/mN5S8fwDPZf/VycifFGo16u+I036seFEjH6dLoLiaAvVlumgMYBq5CCIhmu8SbvdfjC4RXpK4DvuvSNwyvSk/xV06UfHF6QvqKjcKzzAa77gUry1lXWVk08La5oyzi8In12JSsvHqwsJXsrOw/blQWwHcbVyrPxig4bT8cr8N01RXFrimbQxNL1PaIxSw9z1Vy39IayXnO/m4XhkmdiLsNkZV6a4cy4gp4xer0eZTdk3di7t7owXPH7kgaMvb0TprWO8RQLJCH37f/tTlf10YPHCIrDCHpcSJn7nUdPCyl
@sparr
sparr / gist:ac4944172d2375cb8fdb38c448f001ee
Created Apr 27, 2019
Factorio universal belt balancer, 4x4 belts, 23x9 tiles
View gist:ac4944172d2375cb8fdb38c448f001ee
0eNqlm+tu2zAMhd/Fv51B1F15laEY2s3rDKRO4DjDiiLvPrdJsWGR68OzX0F6+URRoshj0S/Nw+7UHcZ+mJrtS9N/3Q/HZvv5pTn2j8P97vVn0/Oha7ZNP3VPTdsM90+v37pfh7E7HjfTeD8cD/tx2jx0u6k5t00/fOt+NVs537VNN0z91HcX4tuX5y/D6emhG+c/WGO1zWF/nP99P7xaMSM3pW2e5w83j/KtH7uvl9/5c3sDt3p4usD9OtzRcMByfwM/zQ4dH8f9/LmEz1V8bN/Xbn+aDqfX1bkZLujnEqqOihV41MMjDE+Mo8KKo/phwU9ZPxVXH6sCLzQc8JOYG/rxsOunaf7lLddfjf4UADIRwhYOBLE0HfGK03hFNF7xarsFN1sfrwaHRxYO7HFJarhiNTMLRzaiPjzx6LSGhQM+t6LY5JrIt/rYxLOGdcTJHugMaPXxiicpGxQrcMXaf1dgdvbF/C9znbYfZ/6MG/vHH/X56KM44fNJLNyda7hMLHVmc7jVB3KBY83pA3kj14Nf/lnvGp4vly1Q0VqajtjOBPRGTH2A9XV2ni7QLTAbTUi/V+amEtNv9kMh7SLjwLTiv+Uj0SXNFK/HlvzfFLNmyLDk1RqZr65t7czyhuZJlSfM4no2ODxfVsv6KeipULf1gwqYDBHpgk+GLrYROBPT5o+jVoPYa4JYFgKqajldbCNuKSwcSHOBLraBvBCEhVePhaCPU4/byoSpp/NJ8IqtGJbSSQ0c2NodKFsCE6ELdcT6URboyhqZiia7flCyKGRIoIvtataNhsVVoysySVfMyuIuR0DUR/O7OADOtehoOrB5oqeVjQHogaYjtkdW2CCmJ8J0A9NVFfHFaKgG33Xf63u00NMBViIZVpQBvkqEOs6w5fRlEgJ37B0J4hbPwhHLg16xQUk9RV4QGXXeTYkfTa++UmbVl6yngVR48WWWtNdyTsuGFV/AXLKwcAPALSnszLqAyY7WdXIG7iHZ2yUgonMgtRfilkiyq+VbTqT
@sparr
sparr / xwininfo -tree -root
Created Mar 27, 2019
sublime text windows
View xwininfo -tree -root
Parent window id: 0x0 (none)
203 children:
0xaa005ad "Sublime Text": ("sublime_text" "Sublime_text") 299x480+0+51 +0+51
1 child:
0xaa005ae (has no name): () 1x1+-1+-1 +-1+50
0xaa00001 "Sublime Text": ("sublime_text" "Sublime_text") 10x10+10+10 +10+10
0x1803b2f "[i3 con] container around 0x564385937840": ("i3-frame" "i3-frame") 1920x1028+0+22 +0+22
1 child:
0xaa00003 "~/src/factorio/mods/factorio-mod-belt-overflow/control.lua (factorio) - Sublime Text": ("sublime_text" "Sublime_text") 1920x1028+0+0 +0+22
View $ gcc unxwb.c
/usr/bin/ld: /tmp/ccG0jyX2.o: in function `xma1_header':
unxwb.c:(.text+0xb5c): undefined reference to `xma_le16'
/usr/bin/ld: unxwb.c:(.text+0xb6a): undefined reference to `xma_le16'
/usr/bin/ld: unxwb.c:(.text+0xb78): undefined reference to `xma_le16'
/usr/bin/ld: unxwb.c:(.text+0xb86): undefined reference to `xma_le16'
/usr/bin/ld: unxwb.c:(.text+0xb94): undefined reference to `xma_le16'
/usr/bin/ld: unxwb.c:(.text+0xbaa): undefined reference to `xma_le32'
/usr/bin/ld: unxwb.c:(.text+0xbb7): undefined reference to `xma_le32'
/usr/bin/ld: unxwb.c:(.text+0xbc4): undefined reference to `xma_le32'
/usr/bin/ld: unxwb.c:(.text+0xbd1): undefined reference to `xma_le32'
@sparr
sparr / out
Created Mar 7, 2019
curl outputs first line of stats separately
View out
-> Downloading v25.4.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120 0 120 0 0 330 0 --:--:-- --:--:-- --:--:-- 329
100 5735k 0 5735k 0 0 2567k 0 --:--:-- 0:00:02 --:--:-- 3574k
-> Downloading itch-setup...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 639 100 639 0 0 919 0 --:--:-- --:--:-- --:--:-- 919
100 5905k 100 5905k 0 0 4067k 0 0:00:01 0:00:01 --:--:-- 8297k
@sparr
sparr / gist:e5967312ef2ef80c3371685e48d8bad3
Created Feb 12, 2019
problem importing backports.shutil_get_terminal_size
View gist:e5967312ef2ef80c3371685e48d8bad3
> pip install backports.shutil_get_terminal_size 44.9s  Tue 12 Feb 2019 10:43:34 AM PST
Requirement already satisfied: backports.shutil_get_terminal_size in /usr/local/lib/python2.7/dist-packages/backports.shutil_get_terminal_size-1.0.0-py2.7.egg (1.0.0)
> python 501ms  Tue 12 Feb 2019 10:43:35 AM PST
Python 2.7.15+ (default, Feb 3 2019, 13:13:16)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import backports.shutil_get_terminal_size
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named shutil_get_terminal_size
@sparr
sparr / xrandr.out
Created Jan 18, 2019
xrandr showing ghost configs from disconnected displays
View xrandr.out
Screen 0: minimum 320 x 200, current 6400 x 1800, maximum 8192 x 8192
eDP-1 connected primary 1920x1080+0+720 (normal left inverted right x axis y axis) 309mm x 174mm
1920x1080 60.02*+ 60.01 59.97 59.96 59.93 47.99
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
@sparr
sparr / dmesg.out
Created Jan 18, 2019
dmesg output with drm debug 0xff then suspend then unplug 2 external monitors (direct HDMI and usb3->dock->miniDP) then wake to discover X crashed
View dmesg.out
[ 1389.681045] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_BUSY
[ 1389.681064] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_MADVISE
[ 1389.681085] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_BUSY
[ 1389.681101] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_MADVISE
[ 1389.681116] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_SET_TILING
[ 1389.681133] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_MMAP
[ 1389.681253] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_BUSY
[ 1389.681269] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_MADVISE
[ 1389.681285] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, I915_GEM_MADVISE
[ 1389.681301] [drm:drm_ioctl [drm]] pid=7676, dev=0xe200, auth=1, DRM_IOCTL_GEM_CLOSE
@sparr
sparr / dmesg.out
Created Jan 18, 2019
dmesg output during failed xrandr with /sys/module/drm/parameters/debug turned on
View dmesg.out
[68512.967004] [drm:drm_ioctl [drm]] pid=20618, dev=0xe200, auth=1, DRM_IOCTL_MODE_CURSOR
[68512.967019] [drm:drm_mode_object_get [drm]] OBJ ID: 109 (2)
[68512.967030] [drm:drm_mode_object_get [drm]] OBJ ID: 164 (2)
[68512.967039] [drm:drm_mode_object_get [drm]] OBJ ID: 93 (1)
[68512.967048] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 109 (3)
[68512.967073] [drm:drm_vblank_enable [drm]] enabling vblank on crtc 0, ret: 0
[68512.967097] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 164 (3)
[68512.967105] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 93 (2)
[68512.967114] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 109 (2)
[68512.967123] [drm:drm_mode_object_put.part.2 [drm]] OBJ ID: 109 (1)
@sparr
sparr / Xorg.0.log
Created Jan 18, 2019
X crashed when waking from sleep
View Xorg.0.log
[ 4.627] (--) Log file renamed from "/var/log/Xorg.pid-972.log" to "/var/log/Xorg.0.log"
[ 4.629]
X.Org X Server 1.20.1
X Protocol Version 11, Revision 0
[ 4.629] Build Operating System: Linux 4.4.0-138-generic x86_64 Ubuntu
[ 4.629] Current Operating System: Linux sparr-granular-7490 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64
[ 4.629] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-13-generic root=UUID=4c05e8f0-b9b0-4bad-a652-b3e41bc5b240 ro quiet splash vt.handoff=1
[ 4.629] Build Date: 25 October 2018 02:53:34PM
[ 4.629] xorg-server 2:1.20.1-3ubuntu2.1 (For technical support please see http://www.ubuntu.com/support)
[ 4.629] Current version of pixman: 0.34.0
You can’t perform that action at this time.