Skip to content

Instantly share code, notes, and snippets.

View hamaluik's full-sized avatar
👋
I may be slow to respond.

Kenton Hamaluik hamaluik

👋
I may be slow to respond.
View GitHub Profile
@KeyMaster-
KeyMaster- / PhysBody.hx
Created April 4, 2015 22:16
Luxe rectangles physics engine (WIP, and very basic)
package ;
import luxe.Component;
import luxe.Rectangle;
import luxe.Vector;
class PhysBody {
public var rect:Rectangle;
public var vel:Vector;
public var acc:Vector;
@ruby0x1
ruby0x1 / Main.hx
Last active April 19, 2016 02:14
Prevent the space key from scrolling the page with luxe
import luxe.Input;
class Main extends luxe.Game {
override function config(config:luxe.AppConfig) {
config.web.prevent_default_keys.push(Key.space);
return config;
package com.dango_itimi.utils;
import haxe.rtti.Meta;
using com.dango_itimi.utils.MetaUtil;
class MetaField
{
public var name(default, null):String;
public var value(default, null):Array<Dynamic>;
public function new(name:String, value:Array<Dynamic>)
@galek
galek / pbr.glsl
Created November 4, 2015 11:10
PBR GLSL SHADER
in vec2 v_texcoord; // texture coords
in vec3 v_normal; // normal
in vec3 v_binormal; // binormal (for TBN basis calc)
in vec3 v_pos; // pixel view space position
out vec4 color;
layout(std140) uniform Transforms
{
mat4x4 world_matrix; // object's world position
@nathanhornby
nathanhornby / typeform-velocity.js
Created December 4, 2015 11:37
Scroll to active field in form (typeform style animation) using velocity.js
// Insert into some kind of 'focus' action
var parent = $(this).parent().parent('.fieldWrap'); // Target a wrapper
// Reset active state
$('.fieldWrap').removeClass('active');
// Add active state to current field
parent.addClass('active');
@joshbode
joshbode / numbered_headings.md
Last active December 16, 2024 18:59
Numbered Headings in Markdown via CSS

World

Country

State

City

Suburb
Street
<style type="text/css"> body { margin: auto;
@larsxschneider
larsxschneider / git-lfsclone.sh
Last active September 12, 2024 02:17
Clone Git repositories and download LFS files in parallel
#!/usr/bin/env bash
#
# Clone Git repositories and download LFS files in parallel
#
set -e
CLEAN_ERROR='push @lines, $_;splice @lines, 0, 7 if /error: external filter failed/;print shift @lines if @lines > 6}{ print @lines;'
git -c filter.lfs.smudge= \
-c filter.lfs.required=false \
@jcward
jcward / Global.hx
Last active June 19, 2022 03:09
Haxe global (like) functions and variables via import
package;
class Global
{
public static function parseInt(s:String):Int { return Std.parseInt(s); }
public static function int(f:Float):Int { return Std.int(f); }
public static function is(v:Dynamic, t:Dynamic):Bool { return Std.is(v, t); }
public static function typeof(o:Dynamic):Type.ValueType { return Type.typeof(o); }
public static var DEBUG_LEVEL:Int = 3;
@PostEpoch
PostEpoch / ResizeReorderableListExample.cs
Last active December 19, 2018 08:32 — forked from p-groarke/ResizeReorderableListExample.cs
Resize Unity Reorderable List example.
// Originally from MALQUA
// https://feedback.unity3d.com/suggestions/custom-element-size-in-reorderable-list
// http://i.imgur.com/fIbBorr.gifv
// and SOCAPEX
// https://gist.github.com/Socapex/1d9b45507464681d530b
// Modified by Jesse Hamburger
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active July 12, 2025 22:10
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file