Skip to content

Instantly share code, notes, and snippets.

View josefnpat's full-sized avatar
what

Seppi josefnpat

what
View GitHub Profile
@josefnpat
josefnpat / readme.md
Last active April 7, 2024 11:39
Going from Lua 5.2 to PICO-8's Lua

This information applies to the PICO-8 0.1.6 release.

This document is here to help folks with a proficiency in Lua understand the limitations and discrepencies between Lua and PICO-8's Lua.

You can always view the manual or yellowafterlife's extended 0.1.1 manual.

General

  • anything written in uppercase the PICO-8 editor or .p8 is made lowercase by the editor. → editing the .p8 file directly can work
  • print(function() end) outputs the string function instead of the string function: 0x0000000.
@josefnpat
josefnpat / no-vim-ads.patch
Created January 10, 2015 20:38
Remove "ads" from vim
diff -r b3bc99b909c3 src/version.c
--- a/src/version.c Sat Jan 10 15:09:25 2015 +0100
+++ b/src/version.c Sat Jan 10 15:37:45 2015 -0500
@@ -2353,9 +2353,6 @@
#endif
N_("Vim is open source and freely distributable"),
"",
- N_("Help poor children in Uganda!"),
- N_("type :help iccf<Enter> for information "),
- "",
#!/usr/bin/php
<?php
/* Transmission to Deluge export script
*
* Transmission - transmission-gtk 2.77 (14031)
* Deluge - deluge: 1.3.6
* Script - PHP 5.4.14 (cli)
*
* How to use this script;
* 1) Run `php trans_to_deluge.php` and make sure there aren't any errors.
@josefnpat
josefnpat / mfp
Last active December 8, 2022 22:22
Download all MusicForProgramming(); tracks, if they aren't already downloaded. dep: php & wget
#!/usr/bin/php
<?php
$xml = simplexml_load_file('http://musicforprogramming.net/rss.php');
$songs = array();
foreach($xml->channel->item as $item){
$songs[] = (string)$item->comments;
}
@josefnpat
josefnpat / back.png
Last active February 17, 2022 00:55
Simple Tetris Clone for LOVE
back.png
@josefnpat
josefnpat / ps4convert.sh
Created December 21, 2017 00:19
Convert video for PS4
# Copy video, convert audio:
./bin/ffmpeg/bin/ffmpeg.exe -i $1 -c:v copy -c:a libmp3lame $2
# Convert video and audio:
./bin/ffmpeg/bin/ffmpeg.exe -i $1 -crf 22 $2.mp4
@josefnpat
josefnpat / pico8_skip_0.1.6_linux32.bsdiff
Last active August 30, 2020 06:24
Pico8 0.1.6 Intro Skip for linux 64
@josefnpat
josefnpat / Makefile
Last active July 5, 2020 08:19
Love Makefile of Doom
# Copyright 2017 Josef N Patoprsty
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@josefnpat
josefnpat / readme.md
Last active October 27, 2019 10:50
Notes on porting LÖVE games from 0.10.2 to 11.0.0

Here are some notes that I am keeping while porting RCS from 0.10.2 to 11.0.0.

love.audio.newSource

It seems that when making a new audio source, it either makes new SoundData from two strings (source,type) instead of defaulting to to the "stream" type. The simplist solution is the following:

While this monkey patch may not work in every case, I suspect it would work in most.

love.audio._newSource = love.audio.newSource
@josefnpat
josefnpat / serverlist.php
Created March 7, 2019 23:25
Simple Server List API
<?php
$mckey = "rcs";
$memcache = new Memcache;
$memcache->addServer("localhost");
$server = $memcache->get($mckey);
if($server == false){
$server = new stdClass();
$server->list = array();