Skip to content

Instantly share code, notes, and snippets.

View EduardoLopes's full-sized avatar

Eduardo Lopes EduardoLopes

View GitHub Profile

etc etc var code = 'test' etc etc

(function loop(){
requestAnimationFrame(loop);
}());
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var del = require('del');
var htmlmin = require('gulp-htmlmin');
var smoosher = require('gulp-smoosher');
var cssmin = require('gulp-cssmin');
var es = require('event-stream');
var htmlbuild = require('gulp-htmlbuild');
var runSequence = require('run-sequence');
~/Tilemap$ lime test neko
Invalid operation (%)
Called from flixel/tile/FlxTilemap.hx line 2122
Called from flixel/tile/FlxTilemap.hx line 394
Called from PlayState.hx line 70
Called from flixel/FlxGame.hx line 583
Called from flixel/FlxGame.hx line 668
Called from flixel/FlxGame.hx line 648
Called from flixel/FlxGame.hx line 493
@EduardoLopes
EduardoLopes / README.md
Created December 16, 2014 12:59
What Colour Is It in 466 bytes!

'What Colour Is It' in 466 bytes

annotated.html have comments to explain what is happening in that script;

  • Responsive;
  • Font resize based on the size of the window;
  • Should take care of retina displays (i can't test)!
  • Should support all recent browsers. (but i can't test all of then, would be nice some help).
@EduardoLopes
EduardoLopes / longest_word_in_a_string.py
Created February 10, 2015 18:28
A program made in python that shows the longest word in a setence
import re
filter_regex = re.compile('[^a-zA-Z\s]+')
def string_filter(word):
'''(str) > str
Remove marks from a string
>>> string_filter('hi!')
package ;
import flash.display.Graphics;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.util.FlxPoint;
import flixel.util.FlxColor;
import flixel.util.FlxArrayUtil;
import flixel.plugin.PathManager;
import flixel.interfaces.IFlxDestroyable;
package;
import flixel.FlxG;
import flixel.FlxSprite;
import flixel.util.FlxRandom;
class Cloud extends FlxSprite
{
public static var COUNT:Int = 0;
@EduardoLopes
EduardoLopes / FlxGroupBug.md
Last active August 29, 2015 14:20
FlxGroup and FlxTypedGroup '-dce full' "bug"!

Nape only works if we enable -dce full! i guess this is a linux only issue! openfl/openfl#158

-dce full affect all the classes used in the project, if you don't want some class to be affected, you need to use the keep method!

What was happening is: the class i wanted to use with FlxTypedGroup was not being instantiated with new! so, i guess, the 'dce' thought that it was not being used and remove it, passing a null type to the FlxTypedGroup recycle method!

I fixed it adding the class i want to use with FlxTypedGroup to the keep method!

Yeah, a lot of time to figure out this!

<!DOCTYPE html public "html5 rocks">
<html>
<head>
<meta charset="utf-8">
<title>Animation - Post Fixes</title>
<style>
.mover {