Skip to content

Instantly share code, notes, and snippets.

Eduardo Lopes EduardoLopes

Block or report user

Report or block EduardoLopes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Perlin.wren
import "random" for Random
class Perlin{
construct new(seed, dimension, octaves, tile, unbias){
_random = Random.new(seed)
_dimension = dimension
_octaves = octaves
View index.js
var budo = require('budo')
//There's no erro if running this directly from the command line
//the error doesn't show if the dir arg is removed
//if there's the --dir arg, subarg seems to change the result
budo.cli(['app/js/main.js:bundle.js', "--live", "--dir", "./app", "-- -t babelify --presets [ env ]"])
/*
Error: TypeError: file.split is not a function
View QuadPackGeometry.hx
override public function quad_add( _options:PackedQuadOptions ) : Int {
def(_options.visible, true);
def(_options.flipx, false);
def(_options.flipy, false);
var _uid = Luxe.utils.uniquehash();
//First triangle
@EduardoLopes
EduardoLopes / Main.hx
Last active Oct 5, 2017
Luxe shutdown bug - test case
View Main.hx
/** TEST 4 **/
/** It tries to destroy NOT_child_sprite even when destroy is called from where Luxe.shutdown is being called **/
import luxe.GameConfig;
import luxe.Input;
import luxe.Sprite;
class Main extends luxe.Game {
@EduardoLopes
EduardoLopes / randompaper
Created Sep 22, 2016
Phyton script to randomly change wallpaper on lubuntu picking the wallpaper form a folder
View randompaper
#!/usr/bin/env python
import os,random
wallpapers_dir = '/media/100/Wallpapers/';
wallpaper = random.choice(os.listdir(wallpapers_dir))
os.system("pcmanfm --set-wallpaper="+wallpapers_dir+wallpaper)
@EduardoLopes
EduardoLopes / debug.md
Created Dec 20, 2015
luxe empty project debug - compiled with hxcpp 3.2.203 official package
View debug.md
$ gdb luxe_empty
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
@EduardoLopes
EduardoLopes / gist:6b9850a7af6fc9babb2f
Last active Dec 18, 2015
luxe empty project debug - compiled with hxcpp commit history on 0872fd15501c15f99aa136ba14d859e0cb9aa97a
View gist:6b9850a7af6fc9babb2f
(gdb) bt
#0  0x08714fa8 in hx::MarkAllocUnchecked (inPtr=0x8932324 <hx::__res_0+4>, __inCtx=0x896be28)
    at /media/160/.haxelib/hxcpp/git/src/hx/gc/Immix.cpp:1307
#1  0x0806d562 in hx::MarkAlloc (inPtr=0x8932324 <hx::__res_0+4>, __inCtx=0x896be28)
    at /media/160/.haxelib/hxcpp/git/include/hx/GC.h:284
#2  0x0807e5fb in hx::MarkMember<String> (outT=..., __inCtx=0x896be28)
    at /media/160/.haxelib/hxcpp/git/include/hx/GcTypeInference.h:36
#3  0x0831ddc7 in phoenix::Shader_obj::__Mark (this=0xb7be433c, __inCtx=0x896be28) at ./src/phoenix/Shader.cpp:1971
#4  0x0871517a in hx::MarkObjectAllocUnchecked (inPtr=0xb7be433c, __inCtx=0x896be28)
View debug-hxcpp-commit-1c1283c6316be915e211c600fd5eb79e2f710e60.md

Debug info got from commit 1c1283c6316be915e211c600fd5eb79e2f710e60 on debug mode

(gdb) run
Starting program: /var/www/empty/bin/linux/luxe_empty 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
@EduardoLopes
EduardoLopes / main.hx
Created Dec 10, 2015
Luxe Pixel Perfect camera scale
View main.hx
override function onwindowsized( e:WindowEvent ):Void {
zoomRatio.x = Math.floor(Luxe.screen.w / gameResolution.x);
zoomRatio.y = Math.floor(Luxe.screen.h / gameResolution.y);
//get the smallest zoom ratio between zoomRatio.x and zoomRatio.y, and limit it to be greater or equal 1
zoom = Math.floor(Math.max(1, Math.min(zoomRatio.x, zoomRatio.y)));
var width = gameResolution.x * zoom;
var height = gameResolution.y * zoom;
@EduardoLopes
EduardoLopes / debug.md
Last active Nov 18, 2015
luxe empty project debug - compiled with hxcpp 3.2.193
View debug.md
(gdb) run
Starting program: /var/www/empty/bin/linux/luxe_empty 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in <module>
    from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
[New Thread 0xb75bdb40 (LWP 18915)]
You can’t perform that action at this time.