Skip to content

Instantly share code, notes, and snippets.

View CrushedPixel's full-sized avatar

Marius Metzger CrushedPixel

View GitHub Profile
@DevSrSouza
DevSrSouza / pom.xml
Created May 18, 2021 12:31
Compose compiler in a Maven Project
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>mainModule</artifactId>
<groupId>me.devsrsouza</groupId>
<version>1.0</version>
<packaging>jar</packaging>
@Vercidium
Vercidium / greedyvoxelmeshing
Last active September 27, 2025 00:00
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implementation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)
@AinTunez
AinTunez / logicSwing.js
Created April 25, 2018 12:25
Logic Pro X script to non-destructively add swing
PluginParameters = [
{name: 'Swing %', minValue: 0, maxValue: 30, numberOfSteps: 60, defaultValue: 20},
{name: 'Note Length Adjust %', minValue: 0, maxValue: 100, numberOfSteps: 200, defaultValue: 50},
{name: 'Ignore Channel', minValue: 0, maxValue: 16, numberOfSteps: 16, defaultValue: 0}
];
var beat = 0;
NeedsTimingInfo = true;
var activeSwing = [];
function HandleMIDI (e) {
var ignore = GetParameter('Ignore Channel'), delay = GetParameter('Swing %')/100;
@bluekvirus
bluekvirus / jersey-hibernate-mariadb-tomcat.md
Created January 23, 2017 22:53
Develop a Jersey (Restful Web) Application using Hibernate and MariaDB

Develop a Jersey Application using Hibernate and MariaDB

@credit Yan Zhu (https://github.com/nina-zhu)

Introduction

Jersey is the most popular amongst Restful web service development. Latest Jersey 2.x version has been developed by Oracle/Glassfish team in accordance with JAX-RS 2.0 specification. Earlier Jersey 1.x version was developed and supported by Oracle/Sun team.

Latest Jersey release version is 2.25 see here and look documentation and API for details. We will implement a Jersey example in this article based on latest 2.x version.

In this article, we will use Hibernate's rich API to interact with MariaDB database or in general any ORM compliant database. We will create a

@hiroakioishi
hiroakioishi / PoissonDiskSampler3D.cs
Last active April 7, 2025 08:15
Implementation of Poisson Disk Sampling for 3D
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// Implementation for 3D from Gregory Schlomoff's Unity source: http://gregschlom.com/devlog/2014/06/29/Poisson-disc-sampling-Unity.html
///
/// Usage:
/// PoissonDiskSampler3D sampler = new PoissonDiskSampler3D(10, 5, 7.5f, 0.3f);
/// foreach (Vector3 sample in sampler.Samples()) {
/// // ... do something, like instantiate an object at (sample.x, sample.y, sample.z) for example:
@pdarragh
pdarragh / Jekyll Static Highlighting Navigation Menu.md
Last active November 24, 2024 21:49
Jekyll navigation bar with automatic highlighting.

Jekyll NavBar

In building a site powered by Jekyll and hosted by GitHub, I wanted the ability to highlight the current page's tab in the bar. I also wanted the bar to support second-level items (i.e. a dropdown), which proved somewhat tricky. This is the solution I arrived at after a few hours of fiddling around.

Construction

The contents of the navigation bar are contained in a data file located at _data/navigation.yml. This makes it accessible via the site-wide Liquid element {{ site.data.navigation}}. You can see the file for the formatting I used.

How it Works

@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active March 12, 2025 04:26
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@idleberg
idleberg / fish_shell.md
Last active October 7, 2025 17:54
Instructions on how to install Fish shell on Mac OS X, including Oh My Fish!. Also includes several useful functions.

Installation

  1. Install fish via Brew
  2. Optionally install Oh My Fish!
  3. Add fish to known shells
  4. Set default shell to fish
brew install fish  
curl -L https://get.oh-my.fish | fish
@tonybruess
tonybruess / Username limitations for various services.txt
Last active October 3, 2025 16:30
Username limitations for various services
Skype
Min: 6
Max: 32
Can contain: a-z A-Z 0-9 . , _ -
Other: Must start with a letter
Twitter
Min: 1
Max: 15
Can contain: a-z A-Z 0-9 _
@wacko
wacko / gist:5577187
Last active July 13, 2024 00:48
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:

VirtualBox > Settings > Network > Add (you will get vboxnet0)

On a terminal ifconfig will show you new interface vboxnet0

VM's Settings > System > check "Enable I/O APIC." VM's Settings > Network > Adapter 2 > host-only vboxnet0