Skip to content

Instantly share code, notes, and snippets.

View josefnpat's full-sized avatar
what

Seppi josefnpat

what
View GitHub Profile
@josefnpat
josefnpat / drawable-hdpi.png
Last active August 29, 2015 13:55
love-android-sdl2-icon
drawable-hdpi.png
@josefnpat
josefnpat / gist:9679636
Created March 21, 2014 04:41
Simple synth
-- public domain
-- author: LPGhatguy
local default_samples = 48000
local pitch_rate = 2^(1 / 12)
local function round(n)
return math.floor(n + 0.5)
end
@josefnpat
josefnpat / main.lua
Last active August 29, 2015 14:02
Feature and Limit Profiler
print("Features:")
for _,feature in pairs({
"canvas","npot","subtractive","shader","hdrcanvas","multicanvas",
"mipmap","dxt","bc5","srgb"
}) do
print(feature,love.graphics.isSupported(feature))
end
print("\nLimits:")
for _,limit in pairs({
@josefnpat
josefnpat / slg09x-run.sh
Created July 10, 2014 18:13
Starfire Lords: Genesis run script for LÖVE
#!/bin/sh
# Copyright (c) 2014 Josef Patorpsty
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
@josefnpat
josefnpat / pendulumsclass.lua
Created July 21, 2014 20:52
Pendulums Class - Love
-- http://i.imgur.com/0X0LTRs.gif by /r/davebees
-- recreated (to some degree) by @josefnpat
-- pendulumsclass.lua
local pendulums = {}
function pendulums.new(x,y,r,lcount)
local self = {}
@josefnpat
josefnpat / !ACER E3-111C0WA.md
Last active August 29, 2015 14:05
Ubuntu 14.04.1 on the ACER E3-111-C0WA

#ACER E3-111C0WA

http://i.imgur.com/GYmBiU6.png

Tested this with Ubuntu 14.04.1

Here is my experience with the ACER E3-111C0WA that I got from Best Buy.

This machine and it's siblings, from what I have read, are notorious for being non-linux friendly.

@josefnpat
josefnpat / obey-tux.svg
Created August 20, 2014 15:38
Obey Tux
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josefnpat
josefnpat / repo.sh
Created August 23, 2014 15:45
hg/git alias
#!/bin/sh
if git rev-parse --git-dir > /dev/null 2>&1; then
git "$@"
elif hg verify 1>/dev/null 2>/dev/null; then
hg "$@"
else
echo "This is not a repo, you dumb fuck."
fi

Keybase proof

I hereby claim:

  • I am josefnpat on github.
  • I am josefnpat (https://keybase.io/josefnpat) on keybase.
  • I have a public key whose fingerprint is E93D AC4A 99DB F831 492A 19CF 13F2 8257 5070 D310

To claim this, I am signing this object:

@josefnpat
josefnpat / main.lua
Last active August 29, 2015 14:11
The Nick Waanders FPS Rating Module (For LÖVE 0.8.x and 0.9.x)
function love.draw()
require "waandersrate"() -- The only required line!
love.graphics.print("Simulated FPS: "..love.timer.getFPS(),64,64)
end
-- Override love.timer.getFPS for testing
function love.timer.getFPS()
return love.mouse.getX()/love.graphics.getWidth()*60
end