Skip to content

Instantly share code, notes, and snippets.

View haste's full-sized avatar

Trond A Ekseth haste

  • AMOI
  • Oslo, Norway
View GitHub Profile

Keybase proof

I hereby claim:

  • I am haste on github.
  • I am troeks (https://keybase.io/troeks) on keybase.
  • I have a public key ASD_2eqn_66mdL1f-1f7pvLSJOnBsHBufbSs5Oz2-HyNfgo

To claim this, I am signing this object:

INPUT:
--[[ frame:EnableElement(name, unit)
Used to activate an element for the given unit frame.
* self - unit frame for whom the element should be enabled
* name - name of the element to be enabled
* unit - unit to be passed to the element's Enable function. Defaults to the frame's unit
--]]
LEXER:
{typ:2 pos:1 val:--[[ line:2}
SELECT ts_rank(tsvector, tsquery), tsvector @@ tsquery AS match, tsvector, tsquery FROM to_tsvector('simple', 'Wisby Pils') tsvector, to_tsquery('simple', 'Wisby & Pils') tsquery;
ts_rank | match | tsvector | tsquery
-----------+-------+--------------------+------------------
0.0991032 | t | 'pils':2 'wisby':1 | 'wisby' & 'pils'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
> a = {1, nil, nil, 4}
> for k, v in ipairs(a) do print(k, v) end
1 1
> for k=1, #a do local v = a[k] print(k, v) end
1 1
2 nil
3 nil
4 4
local function PortraitUpdate(portrait, unit)
local guid = UnitGUID(unit)
if (guid ~= portrait._guid) then
portrait:SetCamDistanceScale(unpack(C.UnitFrames.PortraitCamDistanceScale))
end
portrait._guid = guid
end
@haste
haste / responsive.css
Last active September 6, 2016 08:52 — forked from anonymous/responsive.css
@media screen and (min-width: 480px) {
/**************************************
TWO COLUMN LAYOUT!
**************************************/
#primary {
width: 50%;
float: left;
}
local CPoints = {}
for index = 1, MAX_COMBO_POINTS do
local CPoint = self:CreateTexture(nil, 'BACKGROUND')
-- Position and size of the combo point.
CPoint:SetSize(12, 16)
CPoint:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', index * CPoint:GetWidth(), 0)
CPoints[index] = CPoint
end
-- Position and size
local Power = CreateFrame("StatusBar", nil, self)
Power:SetHeight(20)
Power:SetPoint('BOTTOM')
Power:SetPoint('LEFT')
Power:SetPoint('RIGHT')
-- Add a background
local Background = Power:CreateTexture(nil, 'BACKGROUND')
Background:SetAllPoints(Power)
-- Position and size
local Health = CreateFrame("StatusBar", nil, self)
Health:SetHeight(20)
Health:SetPoint('TOP')
Health:SetPoint('LEFT')
Health:SetPoint('RIGHT')
-- Add a background
local Background = Health:CreateTexture(nil, 'BACKGROUND')
Background:SetAllPoints(Health)