Skip to content

Instantly share code, notes, and snippets.

@arieh
arieh / dabblet.css
Created December 16, 2011 17:57
Untitled
div.tip{
margin:100px 150px;
width:25px;
height:25px;
border:1px solid orange;
border-radius:50%;
background:linear-gradient(top, #f9f44a 2%, #ffa51e 61%, #d17308 100%);
position:relative;
cursor:pointer;
}
@arieh
arieh / Stack.js
Created May 2, 2012 11:58
Stack.js
/*!
Copyright (c) <2012> <Arieh Glazer>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@arieh
arieh / Stack.js
Last active December 11, 2015 03:48
a small flow-control objecy
function Stack(){
function next(){
var fn = this.$stack[this.$index++];
return fn && fn.apply(this, arguments);
}
function current(){
var fn = this.$index === 0 ? this.$stack[this.$index] : this.$stack[this.$index -1];
return fn && fn.apply(this, arguments);
}
@arieh
arieh / widgets.js
Created February 27, 2013 22:03
how do I solve this issue w/ AMD?
//what we currently have
//test1.js
widget.register('test1',{
//widget code
});
//test2.js
widget.register('test2',{
@arieh
arieh / hack.php
Last active December 25, 2015 06:09
<?php
function overload($obj){
$obj->setHeader = function() $obj as $this {
//magic happens here
}
}
class Mobile_Cart_View extends Cart_View {
public function __construct(){
<?
class _Mobile_Cart_View extends Cart_View {
public function __construct(){
$this->reskin = new _Mobile_Reskin_SubView($this, 'Cart');
}
public function setHeader(){
$this->reskin->generateHeader();
}
@arieh
arieh / bound.js
Last active February 11, 2016 05:53
Bound mixin
function Bind(){
var i,fn;
/**
* holds the generated bound function collection
* @property bound
* @protected
* @type object
*/
this.bound = function(name){
local TMW = TMW
if not TMW then return end
local L = TMW.L
local Type = TMW.Classes.IconType:New("scriptbar")
Type.name = "Script Bar"
Type.desc = "A Bar that can be controlled by LUA scripts"
Type.menuIcon = "Interface/Icons/inv_box_04"
Type.unitType = "unitid"
Type.hasNoGCD = true
function TMW_ST:SetScriptText(name, text)
TMW_ST.ScriptTexts[name] = text
TMW:Fire("TMW_ST_VARIABLE_MODIFIED", name)
end
local DogTag = LibStub("LibDogTag-3.0", true)
if DogTag then
TMW:RegisterCallback("TMW_ST_VARIABLE_MODIFIED", DogTag.FireEvent, DogTag)
^1^T^SPoint^T ^Sy^F4982309702860793 ^f-44^SrelativePoint ^SBOTTOMLEFT^Sx ^F4725488912170997^f-42 ^t^SScale^N1.1416677236557 ^SRows^N2 ^SEnabledSpecs^T ^N270^b ^N269^b ^t^SGUID^STMW:group:1QzAtJBAo3I4 ^SColumns^N1 ^SIcons^T ^N1^T ^SShowTimer^B ^SType^Scooldown ^SShowTimerText^B ^SName^STranscendence ^SEvents^T ^N1^T ^SType^SLua ^SLua^S--~`<Untitled~`Lua~`Code>~J ~J local~`icon~`=~`...~J ~J --Your~`code~`goes~`here:~J ~J ~J local~`x,y~`=~`~`GetPlayerMapPosition("player")~J TMW._trans_location~`=~`{x=x*1000,~`y=~`y~`*~`1000}~`~J ~J ^SEvent^SOnCondition ^SOnConditionConditions^T ^N1^T ^SType^SSPELLCD ^SOperator^S> ^SLevel^N9 ^SName^STranscendence ^t^Sn^N1 ^t^t^Sn^N1 ^t^SSettingsPerView^T ^Sicon^T ^STexts^T ^N1^S ^t^t^t^SStates^T ^N1^T ^t^N2^T ^SAlpha^N0.5 ^t^N3^T ^t^N4^T ^t^N102^T ^SAlpha^N0.5 ^t^t^SEnabled^B ^t^N2^T ^SShowTimer^B ^SType^Scooldown ^SConditions^T ^N1^T ^SType^SLUA ^SName^Slocal~`x,y~`=~`GetPlayerMapPosition("player")~J ~J local~`current~`=~`{x=x*1000,~`y=~`y~`*~`1000}~J ~J ~J ~J local~`last~`=~`T