Skip to content

Instantly share code, notes, and snippets.

View ftomassetti's full-sized avatar

Federico Tomassetti ftomassetti

View GitHub Profile
@harieamjari
harieamjari / kpa.c
Last active October 2, 2023 03:10
An implementation of Karplus-Strong Algorithm in C. Using /dev/urandom in linux.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <time.h>
#define SECONDS 6 /* you can change this to suit for your preferences */
#define LENGTH 300 /* you can experiment with different string length */
char wav_struct[] = {
'R', 'I', 'F', 'F',
@latant
latant / rmi-example.kt
Created March 9, 2020 22:59
An example using Java RMI with Kotlin
import java.io.Serializable
import java.rmi.Remote
import java.rmi.RemoteException
import java.rmi.registry.LocateRegistry
import java.rmi.server.UnicastRemoteObject
class Person(val name: String, val age: Int): Serializable
interface HelloService : Remote {
@Throws(RemoteException::class)
@smarr
smarr / truffle-material.md
Last active March 16, 2023 14:06
Truffle: Languages and Material
@NetzwergX
NetzwergX / com.jme3.terrain.util.HeightBasedAlphaMapGenerator.java
Last active November 24, 2016 14:26
Heightmap based alpha map generator for jME3
/*
* Copyright (c) 2009-2016 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.