- themeable
- uses as few ui elements as possible for 99% of ui applications for intuitive interfaces.
- widgets are added to a container/panel that "automagically" organizes elements
- container/panels automatically resize for flow
This file contains 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 cssify(...) | |
local args={...} | |
for k,v in pairs(args) do | |
args[k] = v / 255 | |
end | |
return args | |
end | |
function uncssify(...) | |
local args={...} |
This file contains 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
-- inside Player:initialize() | |
local Player = class("Player") | |
Player:initialize() | |
--snip | |
self.keybinds = { | |
moveHorizontal = { | |
majorType = "Axis", | |
config = { | |
{ |
This file contains 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
--[[ | |
MeshGraph, a library to draw meshes as graphs. | |
@TODOS: a whole bunch of stuff | |
* canvas optimization? | |
* can't relocate, changes must propigate through the entire list of points | |
]] | |
local LineGraph = class("LineGraph") |
This file contains 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
<?php | |
/* | |
* A utility file to update a minecraft server that gets its resources from a solder link. | |
* Requires solder to respect the /:slug/:build:/server api request. | |
* Can work without it, with some modifications. | |
*/ | |
//$mcversion = "1.7.10"; | |
//$forgeversion = "1.7.10-10.13.4.1492-1.7.10"; |
This file contains 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
.ironic { | |
font-family: "Comic Sans MS", "Comic Sans", cursive; | |
color: rebeccapurple; | |
font-size: 26pt; | |
text-shadow: black 0px 3px 18px; | |
text-align: center; | |
display: block; | |
width: 100%; |
This file contains 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 getWorkshopIdsOnPage(){ | |
var _workshop_ids=""; | |
document.querySelectorAll('.collectionItemDetails a[href*="filedetails"').forEach( | |
function(cv, i, arr){ | |
var url = cv.attributes.getNamedItem('href').value; | |
_workshop_ids += url.split('=')[1] + "\n"; | |
} | |
); | |
console.log(_workshop_ids); | |
} |
This file contains 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 lerp = function(a, b, amount) | |
return a + (b - a) * (amount < 0 and 0 or (amount > 1 and 1 or amount)) | |
end | |
function gen_smooth_noise(width, height, baseNoise, octave) | |
local bit = require("bit") | |
local idata = love.image.newImageData( width, height ) | |
-- Sample period = 2 ^ octave; | |
local samplePeriod = bit.lshift(1, octave) |
This file contains 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(document){ | |
var i, scripts = document.getElementsByTagName("script"), | |
attributes = new Map([ | |
['fontFamily', 'Menlo,Monaco,Consolas,"Courier New",monospace'], | |
['overflow', 'auto'], | |
['display', 'block'], | |
['backgroundColor', '#f5f5f5'], | |
['border', '1px solid #cccccc'], | |
['borderRadius', '4px'], | |
['whiteSpace', 'pre'] |
This file contains 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
# take a twitter m3u8 link and download it properly | |
function Get-TweetVid { | |
param( [string]$Uri, [string]$OutDir ) | |
$out_file = (Split-Path $Uri -Leaf).Replace(".m3u8", ".mp4") | |
$out_path = Join-Path $OutDir $out_file | |
if( -Not (Test-Path $out_path) ){ | |
mkdir -Path $out_path | |
} | |
ffmpeg -i $Uri -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $out_path | |
} |
OlderNewer