Skip to content

Instantly share code, notes, and snippets.

View omgmog's full-sized avatar
⌨️

Max Glenister omgmog

⌨️
View GitHub Profile
@omgmog
omgmog / sdl_controllers.txt
Created July 16, 2021 08:51
Pico-8 GPi SDL controller config
030000005e0400008e02000014010000,Microsoft X-Box 360 pad,platform:Linux,a:b1,b:b0,x:b3,y:b2,back:b8,start:b9,-leftx:h0.8,+leftx:h0.2,-lefty:h0.1,+lefty:h0.4,lefttrigger:b4,righttrigger:b5,
@omgmog
omgmog / pocketchip-load
Created August 27, 2019 08:36
/usr/sbin/pocketchip-load patched to disable/enable touch input while sleeping
#!/bin/bash
export POCKETCHIP=true
function setPocketchip {
DISPLAY=:0 XAUTHORITY=${HOME}/.Xauthority xmodmap ${HOME}/.Xmodmap 2> /dev/null
STATUS="$?"
if [ "$STATUS" != "0" ] ; then
while [ "$STATUS" != "0" ] ; do
@omgmog
omgmog / .jwmrc
Last active May 30, 2019 13:29
Generate list of games for JWM menu (http://joewing.net/projects/jwm/) on PocketCHIP
<!-- Example Menu in .jwmrc config-->
<!-- ... -->
<Menu label="GBA Games" icon="gba.png">
<Include>exec:$HOME/.scripts/gen_menu_items.sh gba vba</Include>
</Menu>
<Menu label="NES Games" icon="nes.png">
<Include>exec:$HOME/.scripts/gen_menu_items.sh nes nestopia</Include>
</Menu>
@-moz-document domain("mail.google.com") {
/* Last updated March 29, 2019
* Show tasks for Nicholas
* Tell people to turn off chat and use icon actions
* Search for TODO
*/
/* ================================================== */
/* APP BAR (menu and account switcher + container for search) */
/* Hide Gmail logo and name */
html a[title="Gmail"] {
function _init()
_upd=upd_title
_drw=drw_title
end
function _update()
_upd()
end
function _draw()
_drw()
end
@omgmog
omgmog / bitwisetiles.p8
Last active February 15, 2019 16:50
Apply tiles from a tileset based on their neighbors
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
--init
_t=0
dirx={-1,1,0,0,1,1,-1,-1}
diry={0,0,-1,1,-1,1,1,-1}
tiles={16,8,15,7,12,4,11,3,14,6,13,5,10,2,9,0}
function _init()
_upd=upd_game
@omgmog
omgmog / explosion-effect.p8
Created February 9, 2019 11:35
An explosion particle effect
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
--init
function _init()
-- hold debug messages
debug={}
particles={}
p_colors = {5,6,7,10,9,5}
@omgmog
omgmog / outline.p8
Last active February 5, 2019 19:51
example of outline text and sprites, and also palette swapping...
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
function _init()
_t=0
sprites={1,2,3,4}
end
function _update()
_t+=1
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
function _init()
x=-40
y=64
body={1,3}
head={5,7}
s={
@omgmog
omgmog / menu-system.p8
Created February 3, 2019 00:47
Pico-8 menu system
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- init
function _init()
_sfx = {
select = 0,
move = 1,
no = 2
}