Skip to content

Instantly share code, notes, and snippets.

Martin Schrodt spheenik

Block or report user

Report or block spheenik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
spheenik / 2.12.0.patch
Last active Jun 22, 2018
QEMU sound improvement
View 2.12.0.patch
diff --git audio/audio.c audio/audio.c
index 6eccdb17ee..4eb190a18f 100644
--- audio/audio.c
+++ audio/audio.c
@@ -2097,3 +2097,8 @@ void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
+int64_t audio_get_timer_ticks(void)
spheenik /
Created Aug 19, 2016
Autmatically set max display brightness on suspend on Dell XPS 9550
  • cp fix-backlight.service /etc/systemd/system/
  • cp max_backlight /usr/local/bin/
  • chmod a+x /usr/local/bin/max-backlight
  • systemctl enable fix-backlight
spheenik /
Last active Aug 29, 2015
Example code for getting item names in clarity 1.
// e = hero entity
// n = num of item slot
public static String getItemName(Match match, Entity e, int num) {
int handle = e.getProperty(String.format("m_Inventory.m_hItems.%04d", num));
if (handle == Handle.MAX) {
return "";
Entity item = match.getEntities().getByHandle(handle);
String name = item.getProperty("m_iName");
spheenik / gist:caa02067dd12e25d7bd4
Last active Aug 29, 2015
get abilities and corresponding heros
View gist:caa02067dd12e25d7bd4
Iterator<Entity> iter = match.getEntities().getAllByPredicate(new Predicate<Entity>() {
public boolean apply(Entity e) {
return e.getDtClass().instanceOf("DT_DOTABaseAbility");
while (iter.hasNext()) {
Entity ability =;
Integer ownerHandle = ability.getProperty("m_hOwnerEntity");
Entity hero = match.getEntities().getByHandle(ownerHandle);
spheenik / entity positions
Last active Aug 29, 2015
entity positions
View entity positions
private static final int MAX_COORD_INTEGER = 16384;
public static float getVecOrigin(Entity e, int idx) {
Object v = e.getProperty("m_vecOrigin");
if (v instanceof Vector2f) {
float[] v2 = new float[2];
((Vector2f) v).get(v2);
return v2[idx];
} else if (v instanceof Vector3f) {
float[] v3 = new float[3];
spheenik / gist:9711125
Last active Aug 29, 2015
clarity: chat event dump
View gist:9711125
package skadistats.clarity.examples.simple;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import skadistats.clarity.Clarity;
import skadistats.clarity.match.Match;
import skadistats.clarity.parser.DemoInputStreamIterator;
import skadistats.clarity.parser.Peek;
import skadistats.clarity.parser.Profile;
spheenik / gist:9179328
Created Feb 24, 2014
dota string table names
View gist:9179328
You can’t perform that action at this time.