Skip to content

Instantly share code, notes, and snippets.

View eka's full-sized avatar
🏠
Working from home

Esteban Feldman eka

🏠
Working from home
View GitHub Profile
using System;
using System.Collections;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Sirenix.Utilities.Editor;
using UnityEditor;
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using DoozyUI;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
public class RateUsManager : MonoBehaviour
{
using UnityEngine;
/// <summary>
/// Be aware this will not prevent a non singleton constructor
/// such as `T myT = new T();`
/// To prevent that, add `protected T () {}` to your singleton class.
///
/// As a note, this is made as MonoBehaviour because we need Coroutines.
/// </summary>
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
@eka
eka / i3-config
Created September 23, 2017 13:46
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set -g prefix C-a
unbind C-b
set -s escape-time 1
set -g base-index 1
set -g pane-base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind a send-prefix
bind | split-window -h
bind - split-window -v
@eka
eka / gist:eecc562ae8a0465a7eae
Created April 15, 2015 16:54
Cache SQLObject Table Discovery
# in sqlobject/main.py replace this method
def addColumnsFromDatabase(sqlmeta, connection=None):
soClass = sqlmeta.soClass
conn = connection or soClass._connection
import tempfile
import pickle
import os
temp_dir = tempfile.gettempdir()
@eka
eka / PlayState.hx
Created October 11, 2014 22:55
Flash error
private function createHealthCounters():Void {
_currentHealthCounterText = new FlxText(_coreHealthBar.x - 30 , 17, "" + _core.health);
_targetHealthCounterText = new FlxText(_coreHealthBar.x + _coreHealthBar.width + 13, 17, "" + _waveManager.target);
add(_currentHealthCounterText);
add(_targetHealthCounterText);
}
@eka
eka / keybase.md
Created September 22, 2014 18:06

Keybase proof

I hereby claim:

  • I am eka on github.
  • I am eka (https://keybase.io/eka) on keybase.
  • I have a public key whose fingerprint is 91D7 8F8E D86C EA95 54A4 E9E7 463D 52ED F0C4 D9B6

To claim this, I am signing this object:

package ui;
import flixel.util.FlxColor;
import flixel.util.FlxSpriteUtil;
import flixel.FlxSprite;
using flixel.util.FlxSpriteUtil;
class CircularBar extends FlxSprite {
public var min:Float;
public var max:Float;
public var current:Float;
@eka
eka / Arc.hx
Created September 16, 2014 21:16
public function drawArc(sprite:FlxSprite, centerX:Float, centerY:Float, radius:Float, startAngle:Float, arcAngle:Float, steps:Int):Void {
//
// Rotate the point of 0 rotation 1/4 turn counter-clockwise.
startAngle -= .25;
//
var twoPI = 2 * Math.PI;
var angleStep = arcAngle / steps;
// var xx = centerX + Math.cos(startAngle * twoPI) * radius;
// var yy = centerY + Math.sin(startAngle * twoPI) * radius;
var xx = centerX + radius * Math.cos(startAngle);