Skip to content

Instantly share code, notes, and snippets.

View tong's full-sized avatar
👁️‍🗨️

70/V9 tong

👁️‍🗨️
View GitHub Profile
@tong
tong / devicons-by_extension.json
Last active July 12, 2023 20:28
List of nvim-web-devicons in json format
View devicons-by_extension.json
[
{
"icon": "",
"color": "#519aba",
"name": "Cp",
"cterm_color": 74
},
{
"icon": "",
"color": "#77AA99",
@tong
tong / nvim-api.json
Created December 15, 2022 08:45
Nvim api definition in json format
View nvim-api.json
{
"ui_options": [
"rgb",
"ext_cmdline",
"ext_popupmenu",
"ext_tabline",
"ext_wildmenu",
"ext_messages",
"ext_linegrid",
"ext_multigrid",
@tong
tong / armory
Last active December 3, 2022 14:26
Armory fortunes
View armory
Translate object:
transform.translate(1, 2, 3);
%
Get world location:
transform.world.getLoc();
%
Access transform properties in world-space:
View armory-browser.sh
#!/bin/sh
## Armory3D html5 player launcher
if ! [[ $1 =~ https?://.* ]]; then
echo "invalid url"
exit
fi
#if [ -z "$1" ] || [ $1 != http?(s)://* ]; then
#echo "Usage: armory-browser <url>"
@tong
tong / Dockerfile
Last active January 14, 2022 13:15
Dockerfile for building static libv8_monolith.a for linux
View Dockerfile
FROM debian:buster-slim
WORKDIR /build
RUN apt update && apt upgrade -y && apt install -y git curl python lsb-release sudo
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
ENV PATH="/build/depot_tools:${PATH}"
RUN gclient
RUN fetch v8
WORKDIR /build/v8
RUN git checkout branch-heads/9.0
@tong
tong / Tris.hx
Created November 11, 2020 14:37
Tris
View Tris.hx
import js.Browser.document;
import js.Browser.window;
import js.html.CanvasElement;
import js.html.CanvasRenderingContext2D;
import om.Random;
class Tris {
public var canvas(default,null) : CanvasElement;
@tong
tong / App.hx
Last active November 11, 2020 13:49
CiCi Spiral
View App.hx
import js.Browser.document;
import js.Browser.window;
import js.html.CanvasElement;
import js.html.CanvasRenderingContext2D;
class App {
static var canvas : CanvasElement;
static var ctx : CanvasRenderingContext2D;
@tong
tong / Haxe.sublime-syntax
Last active August 31, 2018 07:37
Haxe sublime syntax files (converted from tmLanguage) ! Moved → https://github.com/tong/haxe-sublime-syntax
View Haxe.sublime-syntax
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Haxe
file_extensions:
- hx
- hxsl
- hscript
scope: source.haxe.2
contexts:
@tong
tong / haxelib_plugin.py
Last active July 25, 2018 11:16
Haxelib plugin for the terminator terminal emulator
View haxelib_plugin.py
#!/usr/bin/env python2
# Terminator haxelib url handler
import re
import terminatorlib.plugin as plugin
AVAILABLE = ['HaxelibURLHandler']
View benchmarks
https://github.com/HaxeFoundation/hashlink/tree/master/other/benchs
[Benchmark]
└─ [target] [buildtime] : [runtime]
---
OS: Arch Linux x86_64
Kernel: 4.17.2-1-ARCH