Skip to content

Instantly share code, notes, and snippets.

View lhsazevedo's full-sized avatar

Lucas Azevedo lhsazevedo

View GitHub Profile
@lhsazevedo
lhsazevedo / Dockerfile
Created August 3, 2022 19:27
Dockerfile Jigsaw
FROM php:8-cli
# This Dockerfile adds a non-root user with sudo access. Update the “remoteUser” property in
# devcontainer.json to use it. More info: https://aka.ms/vscode-remote/containers/non-root-user.
ARG USERNAME=user
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
RUN addgroup --gid $USER_GID $USERNAME \
@lhsazevedo
lhsazevedo / lemp-provision.sh
Created February 10, 2021 02:39 — forked from cballenar/lemp-provision.sh
LEMP Provisioning script based on Laravel Forge. Generated on 2020-04-26.
# LEMP Provisioning Script
# - Script generated by Laravel Forge on 20200426
# - Built for Ubuntu 18.04LTS, PHP7.2, MySQL5.7
# Variables
#-------------------------------------------------------------------------------
my_hostname="" # mydomain
my_username="" # myuser
my_root_pw="" # ****************
my_sshkey="" # ssh-rsa AAAA...
@lhsazevedo
lhsazevedo / z80_bitindex_i8.wiz
Created February 7, 2021 06:27
encodingBitIndexI8Operand Test
// SYSTEM z80
import "_z80_memmap.wiz";
// BLOCK 000000
in prg {
func bitindex_i8_test {
// BLOCK dd cb 2a 46 bit 0, (ix + 42)
bit(*((ix + 42) as *u8), 0);
@lhsazevedo
lhsazevedo / amiga.template
Last active January 24, 2021 04:21
WLA-DX makefile generation test
CC=gcc
LD=gcc
CFLAGS= -c -O3 -ansi -pedantic -Wall
LDFLAGS = -lm
WLAFLAGS = $(CFLAGS) -DUNIX -D@CPU_DEFINE
CFILES = @CFILES
HFILES = @HFILES
@lhsazevedo
lhsazevedo / decompress.asm
Last active January 23, 2021 05:39
AKMW Phantasy Star RLE
; 0x293
decompressPhantasyStarRLEToVRAM:
ld b, $04
-:
push bc
push de
call decompressBitplaneToVRAM
pop de
inc de
pop bc
@lhsazevedo
lhsazevedo / test.js
Created January 14, 2021 15:25
Window online and offline events test
window.addEventListener('offline', function () {
console.log('We are offline')
})
window.addEventListener('online', function () {
console.log('We are online')
})
@lhsazevedo
lhsazevedo / versionIsGreaterOrEqual.js
Created January 12, 2021 23:39
Version is A greater or equal than B
function versionIsGreaterOrEqual(versionA, versionB) {
const partsA = versionA.split('.').map(Number)
const partsB = versionB.split('.').map(Number)
for (let i = 0; i < Math.max(partsA.length, partsB.length); i++) {
const a = (partsA[i] === undefined) ? 0 : partsA[i]
const b = (partsB[i] === undefined) ? 0 : partsB[i]
if (a > b) return true;
if (b > a) return false;
@lhsazevedo
lhsazevedo / analysis.md
Last active January 11, 2021 20:06
WLA DX Cyclomatic Complexity Analysis at f67badf

Cyclomatic Complexity Analysis report for WLA DX

Generated at commit f67badf Using Lizard

Warnings

cyclomatic_complexity > 15 or nloc > 1000000 or length > 1000 or parameter_count > 100 !!!!

================================================
    NLOC    CCN  token  PARAM  length location  
------------------------------------------------
@lhsazevedo
lhsazevedo / perseusContent.jsonc
Last active August 5, 2020 20:17
Khan Perseus Content
// Perseus Content for
// https://pt.khanacademy.org/math/precalculus/trig-equations-and-identities-precalc/inverse-trig-functions-precalc/a/inverse-trigonometric-functions-review
[
{
"content": "## Quais são as funções trigonométricas inversas? $\\operatorname{arco seno }(x)$, ou $\\operatorname{sen }^{ -1 }(x)$, é a inversa de $\\operatorname{sen }(x)$. $\\operatorname{arco cosseno }(x)$, ou $\\cos^{ -1 }(x)$, é a inversa de $\\cos(x)$. $\\operatorname{arco tangente }(x)$, ou $\\operatorname{tg }^{ -1 }(x)$, é a inversa de $\\operatorname{tg }(x)$.",
"images": {},
"widgets": {}
},
{
@lhsazevedo
lhsazevedo / settings.jsonc
Created July 9, 2020 13:12
VSCode Operator Mono SSm Lig Settings
{
"editor.fontFamily": "'Operator Mono SSm Lig Book', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"emphasis",
"comment",
"entity.other.attribute-name",