Skip to content

Instantly share code, notes, and snippets.

/script local s,d = GetSpellCooldown("Elemental Mastery");if s==0 then return end;SendChatMessage("Elemental Mastery has "..floor(s+d-GetTime()).."s remaining", "RAID")
@Pondidum
Pondidum / Macros.lua
Last active June 4, 2023 05:50
Macros
AutoFrostShock:
#showtooltip
/startattack
/cast Frost Shock
AutoLightning:
#showtooltip
/startattack
/cast Lightning Bolt
@Pondidum
Pondidum / replace.sh
Created September 23, 2011 08:06
Delete matching lines in files
#!/bin/bash
files=$(find . -type f -name '*.Designer.vb' -print0 | xargs -0 grep -l 'TextReadOnly = False')
for file in $files
do
sed '/TextReadOnly = False/ d' $file >$file.tmp
mv $file.tmp $file
done
#showtooltip Mana Tide Totem
/script local m,s,d='', GetSpellCooldown("Mana Tide Totem");if s==0 then m="Tide Down";else m="Tide CD remaining: "..floor(s+d-GetTime()).."s";end;SendChatMessage(m, "CHANNEL",nil,7)
/cast Mana Tide Totem
public class EventDistributor
{
private readonly Dictionary<Type, List<WeakReference>> _events;
private static readonly Object Padlock = new Object();
public Distributor()
{
_events = new Dictionary<Type, List<WeakReference>>();
}
<viewdata model="EmbeddedSharpFubuSite.HomeViewModel" />
<h1>Hi, I'm an index.</h1>
@Pondidum
Pondidum / InternalRegistry.cs
Last active August 29, 2015 14:00
Structuremap Factory Configuration
public class InternalRegistry : Registry
{
public InternalRegistry()
{
Scan(s =>
{
s.TheCallingAssembly();
s.WithDefaultConventions();
s.AddAllTypesOf<IViewRenderer>();
});
@Pondidum
Pondidum / wow-class-spec-dsl.lua
Last active August 29, 2015 14:04
DSL for class+spec loading
local environment = {
create = function()
local env = {}
env.case = function(condition, resultTable)
return function()
@Pondidum
Pondidum / inheritance.lua
Created November 25, 2014 15:04
Inheritance
local class = {
extend = function(self, this)
--i could put this method on class itself,
--but then i couldnt completely close over the self/base var
local base = self
this.super = function(child)
@Pondidum
Pondidum / Program.cs
Created January 22, 2015 00:41
SelfHost.WebApi with wildcard routing
class Program
{
static void Main(string[] args)
{
var config = new HttpSelfHostConfiguration("http://localhost:62731/");
config.Routes.MapHttpRoute(
"CrossDomain", "{*args}",
new { controller = "CrossDomain" });