This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local WebMaterials = {} | |
function surface.GetURL(url, w, h, time) | |
if !url or !w or !h then return Material("error") end | |
if WebMaterials[url] then return WebMaterials[url] end | |
local WebPanel = vgui.Create( "HTML" ) | |
WebPanel:SetAlpha( 0 ) | |
WebPanel:SetSize( tonumber(w), tonumber(h) ) | |
WebPanel:OpenURL( url ) | |
WebPanel.Paint = function(self) | |
if !WebMaterials[url] and self:GetHTMLMaterial() then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local Interactive2D3D = {} | |
Interactive2D3D.IsVisible = function(self) return (self.Visible or false) end | |
Interactive2D3D.Start = function(self, vPos, aRot, vScale) | |
if !vPos or !aRot then return false end | |
self.Valid = true | |
local plpostoscreenx = vPos.x - LocalPlayer():GetShootPos().x | |
local plpostoscreeny = vPos.y - LocalPlayer():GetShootPos().y | |
local plpostoscreen = math.sqrt( plpostoscreenx^2+plpostoscreeny^2 ) | |
local dist1 = 1/( math.cos( math.rad( EyeAngles().y ) ) ) * plpostoscreen | |
local distfull = 1/( math.cos( math.rad( EyeAngles().p ) ) ) * dist1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local s function switch(v) s = v or false return s end | |
function case(v, yes, no) if s and v and (v==s) then if yes then return yes(s, v) end return true end if no then return no(s, v) end return false end | |
function clearSwitch() s=nil return true end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function draw.ContainerBox( r, x, y, w, h, c, p ) | |
draw.RoundedBox( r or 0, x or 0, y or 0, w or 0, h or 0, c or color_white ) | |
if p then p(x or 0, y or 0, w or 0, h or 0) end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kuronews24 | |
// @description Dark theme for SoraNews24 | |
// @version 1.9 | |
// @author Matt Krins | |
// @namespace https://gist.github.com/mattkrins | |
// @icon https://user-images.githubusercontent.com/2367602/78975577-e4aeca00-7b03-11ea-8b33-e860d636b9ad.png | |
// @homepageURL https://gist.github.com/mattkrins/d06c7504bf92efe933b50dc3b9308573 | |
// @match *://soranews24.com/* | |
// @grant GM_addStyle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HexColor(hex, alpha) | |
hex = hex:gsub("#","") | |
return Color ( tonumber("0x" .. hex:sub(1,2)), tonumber("0x" .. hex:sub(3,4)), tonumber("0x" .. hex:sub(5,6)), alpha or 255 ) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @version 1.4 | |
// @name DarkBargain | |
// @description Dark theme for OzBargain | |
// @namespace https://gist.github.com/mattkrins | |
// @homepageURL https://gist.github.com/mattkrins/520ab6712c0ee5d4b4fecf4703fff976 | |
// @icon https://user-images.githubusercontent.com/2367602/78972377-238d5180-7afd-11ea-9b38-4983a8281184.png | |
// @author Matt Krins | |
// @match *://www.ozbargain.com.au/* | |
// @grant GM_addStyle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name steam-client-link | |
// @description Add button to open steam app on the client. | |
// @namespace https://gist.github.com/mattkrins | |
// @homepageURL https://gist.github.com/mattkrins/470652b0006db6024aa032e11cbcc05f | |
// @icon https://store.steampowered.com/favicon.ico | |
// @version 1 | |
// @description Integrate web store with client. | |
// @author Matt Krins | |
// @match *://store.steampowered.com/app/* |