Skip to content

Instantly share code, notes, and snippets.

View sudo-give-me-coffee's full-sized avatar
🏠
Working from home

Natanael sudo-give-me-coffee

🏠
Working from home
View GitHub Profile
@sudo-give-me-coffee
sudo-give-me-coffee / Lua shell integration.lua
Last active September 19, 2022 17:33
Basic integration with pure Lua with system shell. This allows executing system commands as Lua functions. The command output is returned as a Lua string
-- Create a table to hook __index metamethod of _ENV
_ENV_mt = {}
function _ENV_mt:__index(key)
-- If requested index exists, return them
if rawget(_ENV,key) then
return rawget(_ENV,key)
end

Create your normal derivation

  1. Create C++ and .h files
  2. Do your stuff

Reimplement the paintEvent with:

void YourClass::paintEvent(QPaintEvent *event){
 Q_UNUSED(event)
@sudo-give-me-coffee
sudo-give-me-coffee / Emulando sobrecarga.lua
Created May 26, 2022 12:28
Emulando sobrecarga em lua
function desambiguacao(map,args)
local count = #args
return map[#args](table.unpack(args))
end
-- Os métodos ficam privados
string_builder = {}
string_builder.__index = string_builder
function string_builder.new()
local self = setmetatable({}, string_builder)
self.__data = {}
self.__count = 0
self.__lenght = 0
#!/bin/bash
rm -rf .github/workflows/*
cat > .github/workflows/blank.yml <<\EOF
name: CI
on:
issues:
Funciona maluco!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Introdução

No ano de 2021, o TigerOS teve seu período de maior crescimento, a série 21 foi um verdadeiro laboratório, que permitiu que a distro saísse de uma mera remasterização que apenas empacotava programas para um grupo específico de clientes como era em 2006 ao ponto de ser considerada um sistema que implementa novos recursos e diferenciais.

Uma vez que hoje o TigerOS conta com uma equipe de desenvolvimento e design terceirizados sendo os principai o Elton, o Natanael e o Officinart Designer além de uma equipe de edição de aúdio e vídeo extremamente capacitada, então, agora em 2022 com a série 22, o projeto de divulgação, parcerias e implantação será ampliado de forma surpreendente

@sudo-give-me-coffee
sudo-give-me-coffee / Exemplo de um bom Readme.md
Created May 30, 2021 17:52
Ilustra um readme limpo e fácil de entender


Nome do projeto | Download

O que é?

Descreva seus projeto em uma linguagem não técnica, aqui serve para apresentar seu projeto se ele aparecer numa loja de apps aqui a descrição não seria muito diferente dessa

@sudo-give-me-coffee
sudo-give-me-coffee / install_sis_graphics_on_linux.sh
Created November 13, 2020 22:49 — forked from fevangelou/install_sis_graphics_on_linux.sh
Bash script to install SiS Mirage 3+ graphics drivers on Linux
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
@sudo-give-me-coffee
sudo-give-me-coffee / Script_Fu_for-each-layer.scm
Created February 14, 2020 14:58
This snippet demonstrates how to interact with each layer in GIMP
(define (for-each-layer image drawable)
(let* (
(layers (gimp-image-get-layers image)) ; The list of all layers of image
(all-layers (cadr layers)) ; The list of all layers
(count-layers (- (car layers) 1)) ; The number of layers contained in the image -1 (scheme is zero indexed)
)
(gimp-image-undo-group-start image)
(while (>= count-layers 0)
(let ((current-layer (aref all-layers count-layers))) ; Catches current layer