Skip to content

Instantly share code, notes, and snippets.

View J4n1X's full-sized avatar

J4n1X

View GitHub Profile
@J4n1X
J4n1X / create-haxe-project.sh
Created September 2, 2022 11:55
Creates a new Haxe project from the suggested template, including some bonuses
#!/bin/bash
set -e
MAIN_HX="class Main {
static function main() {
trace(\"Haxe is great!\");
}
}"
NODE_CONFIG="-lib hxnodejs
@J4n1X
J4n1X / CMakeLists.txt
Last active November 12, 2022 21:37
My preferred CMakeLists template for C++
cmake_minimum_required (VERSION 3.8)
project ("example")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
@J4n1X
J4n1X / nasmmacros.asm
Last active November 13, 2023 09:47
These are useful macros for when you need to program in assembly
%ifndef COMMON_MACROS_
%define COMMON_MACROS_
%if __?NASM_VERSION_ID?__ < 0x0020F0500
%fatal Insufficient Version of NASM found! Please use version __?NASM_VER?__ or later.
%endif
%pragma preproc sane_empty_expansion
BITS 64
; 1st arg: The delimiter as a string
@J4n1X
J4n1X / bouncing_balls.p8
Created December 19, 2022 11:28
A bouncing ball demo for the pico-8
pico-8 cartridge // http://www.pico-8.com
version 39
__lua__
-- pico-8 bouncing balls demonstration
-- 2022, by j4n1x
actors={}
pstartx = 1
pendx = 128