Skip to content

Instantly share code, notes, and snippets.

@MangelMaxime
MangelMaxime / Init.el
Created September 11, 2014 21:52
Init.el => FSharp + OSX
;;; Initialize MELPA
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(unless package-archive-contents (package-refresh-contents))
(package-initialize)
;;; Install fsharp-mode
(unless (package-installed-p 'fsharp-mode)
(package-install 'fsharp-mode))
@MangelMaxime
MangelMaxime / FPS.hx
Created December 28, 2014 22:31
FPS class Memory usage
override public function update(dt:Float) {
var now = Timer.stamp();
var memString : String;
this.times.push(now);
while (this.times[0] < now - 1) {
times.shift();
}
@MangelMaxime
MangelMaxime / Main.elm
Created February 10, 2015 12:14
OutlinedContainer
import Color (..)
import Graphics.Collage (..)
import Graphics.Element (..)
import Keyboard
import Signal
import Text
import Time (..)
import Window
{-- Part 1: Model the user input ----------------------------------------------
@MangelMaxime
MangelMaxime / Empty.hx
Created June 7, 2015 09:57
Code for illustrate the text non rendering
package;
import kha.Color;
import kha.Framebuffer;
import kha.Game;
import kha.Image;
import kha.Scaler;
import kha.input.Keyboard;
class Empty extends Game
@MangelMaxime
MangelMaxime / user.behaviors.clj
Created November 5, 2015 08:19
Light Table behaviors for holpon
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
@MangelMaxime
MangelMaxime / user.keymap.clj
Last active November 5, 2015 17:55
Light Table keymap (Azerty french keyboard)
;; User keymap
;; -----------------------------
;; Keymaps are stored as a set of diffs that are merged together to create
;; the final set of keys. You can modify these diffs to either add or
;; subtract bindings.
;;
;; Like behaviors, keys are bound by tag. When objects with those tags are active
;; the key bindings are live. Keys can be bound to any number of Light Table commands,
;; allowing you the flexibility to execute multiple operations together. To see a list
;; of all the commands you can execute, start typing a word related to the thing you
module ItemTask where
import Time exposing (..)
import CommonTypes exposing (ID)
import Json.Encode
import Json.Decode
import Json.Decode exposing ((:=))
-- MODEL
@MangelMaxime
MangelMaxime / BaseComponent.hx
Created January 7, 2016 20:06
Gist for describing problem with several image
package ui.components;
import ui.CursorStyle;
import kha.input.Mouse;
import kha.Framebuffer;
import kha.graphics2.Graphics;
import ui.geom.Rectangle;
import ui.geom.Point;
import kha.Color;
Information:Gradle tasks [:app:assembleAllDebug]
:app:copyArm64-v8aDebugAllKoreSharedLibraryGdbServer UP-TO-DATE
:app:createArm64-v8aDebugAllKoreSharedLibraryGdbsetup
:app:compileArm64-v8aDebugAllKoreSharedLibraryKoreMainC UP-TO-DATE
:app:compileArm64-v8aDebugAllKoreSharedLibraryKoreMainCpp
:app:linkArm64-v8aDebugAllKoreSharedLibrary
:app:stripSymbolsArm64-v8aDebugAllKoreSharedLibrary
:app:arm64-v8aDebugAllKoreSharedLibrary
:app:copyArmeabi-v7aDebugAllKoreSharedLibraryGdbServer UP-TO-DATE
:app:createArmeabi-v7aDebugAllKoreSharedLibraryGdbsetup
@MangelMaxime
MangelMaxime / lua.vm.js-counter.lua
Created June 14, 2016 10:48
Comparing Startlight & lua.vm.js implementation of counter
window = js.global
document = window.document
local counter = 0
local ui = {
button_substract = document:querySelector('.substract'),
button_reset = document:querySelector('.reset'),
button_add = document:querySelector('.add'),
result = document:querySelector('.result')