Skip to content

Instantly share code, notes, and snippets.

View namuol's full-sized avatar

Lou Acresti namuol

View GitHub Profile
@namuol
namuol / pixi.dev.js
Created December 6, 2013 01:51
Pixi.js with basic swapChildren implementation
/**
* @license
* Pixi.JS - v1.3.0
* Copyright (c) 2012, Mat Groves
* http://goodboydigital.com/
*
* Compiled: 2013-12-05
*
* Pixi.JS is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license.php
@namuol
namuol / 0hgamedingoo.md
Last active December 28, 2015 01:49 — forked from josefnpat/0hgamedingoo.md
teeny typos

The #0HGame Jam, the Dingoo and LÖVE 0.7.0

At this point, I find it important to reflect on what I have done, because it is a personal achievement for myself in many ways, but also to the LÖVE developers and the open source community. I'd like to say that without the open source community, none of this would have been possible, even remotely.

Context is due, so I will begin where every writer would begin, at the start.

The #0HGame Compo

I'm a big game compo jam participator. Most of the games I have made have been for game jams (Ludum Dare, Bacon Game Jam, and a few other lesser known ones) and I intend on doing more of them. Not only do they provide me with a greater understanding of game design, but they sharpen my game development skills.

@namuol
namuol / big_render_area.html
Last active December 20, 2015 07:29
Performance issue with pixi.js for large render areas
<!DOCTYPE HTML>
<html>
<head>
<title>pixi.js example 1</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #000000;
}
@namuol
namuol / line-highlights.coffee
Last active December 16, 2015 18:33
Node.js: Line highlights in Markdown using marked + pygmentize
#
# Inspired by http://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/
# by Paul O'Shannessy
#
marked = require 'marked'
pygmentize = require 'pygmentize-bundled'
renderer = new marked.Renderer()
renderer.code = (code, lang) ->
return "<div class='highlight'><code class='#{lang.split('{')[0]}'><pre>#{code}</pre></code></div>"
define [
'fragl'
'util'
'modules/web'
'modules/webgl'
], (fr, util, web, webgl)->
SCR_W = 150
SCR_H = 300
LEFT_WALL = 0
@namuol
namuol / gist:4700359
Created February 3, 2013 02:53
Testing Sublime Text 2 Gist Package
<snippet>
<content><![CDATA[
Hello, ${1:this} is a ${2:snippet}.
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@namuol
namuol / ripflash.py
Created November 24, 2012 11:02
Rip hidden pre-buffered FLV files.
#!/usr/bin/python
import os
psfilter = 'flashplayer'
lnfilter = 'Flash'
dirs = ('/proc/%s/fd' % p for p, c in [x.rstrip('\n').split(' ', 1) \
for x in os.popen('ps h -eo pid:1,command')] if psfilter in c)
possible_videos = []
for d in dirs:
java.io.IOException: mark/reset not supported
at java.util.zip.InflaterInputStream.reset(InflaterInputStream.java:286)
at java.io.FilterInputStream.reset(FilterInputStream.java:226)
at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(SoftMidiAudioFileReader.java:135)
at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1111)
at de.champany.game.gravitation.SoundSystem$SmallSound.load(SoundSystem.java:94)
at de.champany.game.gravitation.SoundSystem.init(SoundSystem.java:27)
at de.champany.game.gravitation.GravitationGUI.<init>(GravitationGUI.java:56)
at de.champany.game.gravitation.Gravitation$1.run(Gravitation.java:51)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
function split_to_lines(str, max_width) {
var current_line, lines, word, words, _i, _len;
lines = [];
words = str.split(' ');
current_line = '';
for (_i = 0, _len = words.length; _i < _len; _i++) {
word = words[_i];
if (current_line.length + word.length > max_width) {
lines.push(current_line);
current_line = word + ' ';
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');