Skip to content

Instantly share code, notes, and snippets.

View macbury's full-sized avatar
🍻
🍺.drink! while 🍺.present?

macbury

🍻
🍺.drink! while 🍺.present?
View GitHub Profile
@hay
hay / gist:1351230
Last active March 29, 2024 16:36
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
<style>
body {
background: white;
text-align: center;
@liamzebedee
liamzebedee / CircleLight.java
Created April 13, 2012 11:24
Slick2D Tile-Based Lighting System
package lessur.engine.lighting.old;
import org.newdawn.slick.Color;
import org.newdawn.slick.geom.Circle;
import org.newdawn.slick.geom.Vector2f;
/**
* A single light in the example. It's capable of determining how much effect
* it will have in any given point on the tile map. Note that all coordinates
* are given in tile coordinates rather than pixel coordinates.
*
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@fhatz
fhatz / MultiRoom.sh
Last active March 29, 2022 12:56
Samsung Multiroom - Console client
#! /bin/bash
# Author: F. Hatz
# based on 'https://github.com/bacl/WAM_API_DOC'
# start with MultiRoom.sh search (search for speakers)
# or with MultiRoom.sh Speaker-IP UUID OBJECTID [OBJECTID OBJECTID ...] volume
# or with MultiRoom.sh Speaker-IP fav1/fav2/fav3/radio1/radio2/radio3 volume
# or with MultiRoom.sh Speaker-IP play/pause/stop (song: play/pause radio: stop)
# or with MultiRoom.sh Speaker-IP next/previous
# or with MultiRoom.sh Speaker-IP mute on/off