Skip to content

Instantly share code, notes, and snippets.

View simone-viozzi's full-sized avatar

simone viozzi simone-viozzi

View GitHub Profile
@alanorth
alanorth / clean-snap-sync-external.sh
Last active January 3, 2023 14:24
Clean snapshots created by snap-sync
#!/usr/bin/env bash
#
# clean-snap-sync-external.sh v1.0.1 (2021-07-09)
#
# Changes
# -------
# 2021-07-09:
# - adjust logic to keep latest x, instead of delete oldest x
# - make output cleaner (hide btrfs subvolume delete output)
#
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 29, 2024 16:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@trandaison
trandaison / starUML.md
Last active June 19, 2024 21:48
Get full version of StarUML
@yavor87
yavor87 / androidPlayAudio.java
Last active August 3, 2023 21:40
Record, play and visualize raw audio data in Android
ShortBuffer mSamples; // the samples to play
int mNumSamples; // number of samples to play
void playAudio() {
new Thread(new Runnable() {
@Override
public void run() {
int bufferSize = AudioTrack.getMinBufferSize(SAMPLE_RATE, AudioFormat.CHANNEL_OUT_MONO,
AudioFormat.ENCODING_PCM_16BIT);
if (bufferSize == AudioTrack.ERROR || bufferSize == AudioTrack.ERROR_BAD_VALUE) {