Skip to content

Instantly share code, notes, and snippets.

View tdgroot's full-sized avatar
🔌

Timon de Groot tdgroot

🔌
View GitHub Profile
public class Camera {
private final Player player;
private final Vector2f size;
private final Level level;
private final Rectangle bounds;
public Camera(Player player, Level level, Vector2f size, Rectangle bounds) {
this.player = player;
this.level = level;
@tdgroot
tdgroot / tiledmap.js
Created November 25, 2013 12:35
A TiledMap Reader and Renderer
/**
* Created by Timon on 20-11-13.
*/
var TiledMap = function (path) {
var request = new XMLHttpRequest();
request.open("GET", path, false);
request.send(null);
var map = JSON.parse(request.responseText);
this.load(map);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Linqerino {
public partial class Posts1 : Page {
package nl.tdegroot.games.pixxel.gfx;
import nl.tdegroot.games.pixxel.util.Log;
import nl.tdegroot.games.pixxel.util.ResourceLoader;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
public class Sprite {
public class DisposableEngine extends Engine {
public void dispose() {
ImmutableArray<Entity> entities = getEntities();
for (Entity e : entities) {
ImmutableArray<Component> components = e.getComponents();
for (Component component : components) {
if (!(component instanceof Disposable)) continue;
Disposable disposable = (Disposable) component;
disposable.dispose();
@tdgroot
tdgroot / XboxMapping.java
Created November 19, 2016 09:40
XBox mapping for LibGDX
package nl.tdegroot.games.melee.util;
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
@tdgroot
tdgroot / magerunmaps-generator.py
Last active August 16, 2017 08:37
Generate your http.magerunmaps config file on hypernode based on your storefront configuration
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2017 Timon de Groot
#
# 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
<?php
namespace Marissen\Theme\Service;
use Magento\Catalog\Model\Product;
use Magento\Framework\Pricing\PriceCurrencyInterface;
class CatalogProductFinalPrice
{
/**
diff --git a/lib/Varien/Db/Adapter/Pdo/Mysql.php b/lib/Varien/Db/Adapter/Pdo/Mysql.php
index e6f48cf1c3..511b9e21c1 100644
--- a/lib/Varien/Db/Adapter/Pdo/Mysql.php
+++ b/lib/Varien/Db/Adapter/Pdo/Mysql.php
@@ -20,7 +20,7 @@
*
* @category Varien
* @package Varien_Db
- * @copyright Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
+ * @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com)
@tdgroot
tdgroot / gist:fa1b83773fd96a00fa6f531f873c30a0
Last active February 28, 2020 09:56
Update Magento 1 copyrights to 2020
grep -rl --exclude="vendor/*" "Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com)" | xargs sed -i 's#Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com)#Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)#g'