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 o = require 'telem.lib.ObjectModel' | |
local t = require 'telem.lib.util' | |
local OutputAdapter = require 'telem.lib.OutputAdapter' | |
local MetricCollection = require 'telem.lib.MetricCollection' | |
local GraphOutputAdapter = o.class(OutputAdapter) | |
GraphOutputAdapter.type = 'GraphOutputAdapter' | |
GraphOutputAdapter.MAX_ENTRIES = 50 |
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
---------------------------------------------------- | |
-- MIGRATED TO https://github.com/cyberbit/fluent -- | |
---------------------------------------------------- | |
-- Fluent by cyberbit | |
-- MIT License | |
-- Version 0.2.0 | |
---@class cyberbit.Fluent |
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
-- CCMaps Installer by cyberbit | |
-- MIT License | |
-- Version 2024-03-17 | |
local paths = { | |
['ccmaps.lua'] = 'https://gist.githubusercontent.com/cyberbit/b64e2e04b1006778b9077553768e07f4/raw/ccmaps.lua', | |
['plotter.lua'] = 'https://github.com/cyberbit/plotter/releases/download/v0.0.4/plotter.lua' | |
} | |
for path, url in pairs(paths) do |
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
-- CCMaps by cyberbit | |
-- MIT License | |
-- Version 0.0.2 | |
local plotterFactory = require 'plotter' | |
-- local polyFactory = require 'luapoly' | |
-- local pprint = require 'cc.pretty'.pretty_print | |
-- shell.run('attach right monitor') |
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 Plotter = (function () | |
-- Plotter by cyberbit | |
-- MIT License | |
-- Version 0.0.2 | |
local pixelbox2 = (function () | |
-- Pixelbox Lite v2 by 9551-Dev | |
-- (v1: https://github.com/9551-Dev/apis/blob/main/pixelbox_lite.lua) | |
local pixelbox = {} |
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 e={}local t,a,o=require,{},{startup=e} | |
local function i(n)local s=o[n] | |
if s~=nil then if s==e then | |
error("loop or previous error loading module '"..n.. | |
"'",2)end;return s end;o[n]=e;local h=a[n]if h then s=h(n)elseif t then s=t(n)else | |
error("cannot load '"..n.."'",2)end;if s==nil then s=true end;o[n]=s;return s end | |
a["ecnet.util"]=function(...) | |
local n={__tostring=function(r)return string.char(unpack(r))end,__index={toHex=function(r)return("%02x"):rep( | |
#r):format(unpack(r))end,isEqual=function(r,d)if | |
type(d)~="table"then return false end;if#r~=#d then return false end;local l=0 |
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
#!/usr/bin/env bash | |
# | |
# Launch a bash session in your docker workspace, from a specified starting directory. | |
# | |
# Usage: larabash [workdir] | |
# workdir: path to starting root directory (defaults to name of current directory) | |
###################################################################################### | |
# Parent directory of project on host machine | |
# for example, project is at /path/to/project/parent/project |
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 | |
$original = [ | |
[ | |
'id' => 1, | |
'name' => 'foo' | |
], | |
[ | |
'id' => 2, | |
'name' => 'bar' |
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
part1 () { | |
let rows = _.split(this.input, '\n') | |
let grid = _.times(MAX_DIM * MAX_DIM, _.constant(0)) | |
_.each(rows, v => { | |
let [x, y, w, h] = _ | |
.chain(v.match(/#\d+ @ (\d+),(\d+): (\d+)x(\d+)/)) // separate parts | |
.tail() // discard full match | |
.map(Number) // cast to numbers | |
.value() // destructure to variables |