Skip to content

Instantly share code, notes, and snippets.

@lukevenediger
lukevenediger / AudioLoaderService.java
Created September 28, 2015 11:51
A service that prepares MediaPlayer instances and caches the most-requested ones for you
package app
import android.content.Context;
import android.media.MediaPlayer;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;
import java.io.IOException;
import java.util.Arrays;
@lukevenediger
lukevenediger / linked_list.js
Last active January 3, 2016 16:19
Linked Lists
/**
* Linked Lists.
* @author Luke Venediger
* @source https://gist.github.com/lukevenediger/8488862
* Read more here: http://lukevenediger.me/algorithms/linked_lists.html
*/
@lukevenediger
lukevenediger / BetterExpando.cs
Last active April 7, 2023 06:11
BetterExpando is a better Expando object because you can: 1) test for the presence of a property 2) return String.Empty for all properties that aren't found 3) control whether property names are case-sensitive or not 4) augment two BetterExpando objects together to get a union of their properties.
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace statsd.net.shared
{
public class BetterExpando : DynamicObject