Skip to content

Instantly share code, notes, and snippets.

@player-03
player-03 / Tiles in View
Last active June 23, 2021 05:43
A demo of how to scroll tiles without creating a new array every frame.
package;
import openfl.Assets;
import openfl.Lib;
import openfl.display.Shape;
import openfl.display.Sprite;
import openfl.display.Tile;
import openfl.display.Tilemap;
import openfl.display.Tileset;
import openfl.events.Event;
@djui
djui / readln.go
Created December 2, 2015 10:08
Minimal readline with timeout example
import (
"bufio"
"errors"
"strings"
"time"
)
// Readln reads and returns a single line (sentinal: \n) from stdin.
// If a given timeout has passed, an error is returned.
// This functionality is similar to GNU's `read -e -p [s] -t [num] [name]`
Copy expressions with Haxe macro
@fabrizioc1
fabrizioc1 / http-proxy.go
Last active October 27, 2020 12:32
Http proxy server in Go
package main
import (
"fmt"
"io"
"log"
"net/http"
)
type HttpConnection struct {
@fracek
fracek / CMakeLists.txt
Last active June 22, 2024 21:33
CMake and GTK+ 3
# Thanks to @danger89 and @Ilothar for updating the gist.
# Set the name and the supported language of the project
project(hello-world C CXX)
# Set the minimum version of cmake required to build this project
cmake_minimum_required(VERSION 3.10)
# Use the package PkgConfig to detect GTK+ headers/library files
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtkmm-3.0)