Skip to content

Instantly share code, notes, and snippets.

View omgmog's full-sized avatar
⌨️

Max Glenister omgmog

⌨️
View GitHub Profile
@omgmog
omgmog / parallax-scroll.js
Created October 28, 2013 15:26
Simple parallax background scrolling with jQuery
$(function() {
var $el = $('.parallax-background');
$(window).on('scroll', function () {
var scroll = $(document).scrollTop();
$el.css({
'background-position':'50% '+(-.4*scroll)+'px'
});
});
});
@omgmog
omgmog / VRUXUI.md
Last active August 24, 2023 14:06
This is mirrored from the now unavailable http://vruxui.com/video-gallery

Click an image below to view the video on Youtube.

VRPlanetarium

Menu Interactions

Environment

@omgmog
omgmog / dialog.p8
Last active August 5, 2023 06:24
Dialog system for Pico-8
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
function sleep(s)
for i=1,s*30 do
flip()
end
end
@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 / custom-font.p8
Last active November 29, 2020 14:02
custom 5x7 font for pico8, mostly based on this font: https://www.dafont.com/type-writer.font
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
global_y = 0
function mt(t1,t2)
local new = {}
for k,v in pairs(t1) do new[k] = v end
for k,v in pairs(t2) do new[k] = v end
return new
end
@omgmog
omgmog / gist:33ec177eea6b78adbaf3
Created May 28, 2014 14:28
Convert an m4v to gif with ffmpeg
ffmpeg -i input.m4v -pix_fmt rgb24 -r 10 -y -s [width]x[height] output.gif
@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