Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .php
Last active April 19, 2024 14:45
RELATÓRIO PedidosReport ( TCPDF )
<?php
include_once('vendor/tecnickcom/tcpdf/tcpdf_include.php');
class AWIPDF extends TCPDF
{
function Header()
{
TTransaction::open('tutorerpdfe');
@scriptdev
scriptdev / .php
Last active April 19, 2024 14:44
RELATÓRIO ReciboReport ( TCPDF )
<?php
include_once('vendor/tecnickcom/tcpdf/tcpdf_include.php');
class ReciboReport extends TWindow
{
public function __construct($param)
{
parent::__construct();
@DNA
DNA / cheatsheet.txt
Created June 4, 2020 01:49
Terminal colors cheat sheet
"WTF IS \033[30;47m???", a practical cheat-sheet
Font color definitions can be intimidating and nonsense at first,
but it is quite easy, lets just follow character by character:
┌────────┤\033├── Escape character (ESC)
│┌───────┤ [ ├── Define a sequence (many characters in a code)
││
││┌──────┤ X ├── Parameter (optional) ┐
│││┌─────┤ ; ├── Parameter separator │ SGR Code
@YodaEmbedding
YodaEmbedding / .clang-format
Last active April 19, 2024 14:43
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@scriptdev
scriptdev / .php
Last active April 19, 2024 14:42
ENVIO DE MENSAGEM VIA WHATSAPP USANDO UMA API REST
<?php
// SERVIÇO USADO: https://www.z-api.io/
// DOCUMENTAÇÃO: https://developer.z-api.io/message/send-message-text
public function onEnviarMensagem($param = null)
{
try
{
@paulirish
paulirish / what-forces-layout.md
Last active April 19, 2024 14:42
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@scriptdev
scriptdev / .php
Last active April 19, 2024 14:41
PEGAR O PRIMEIRO NOME e SOBRENOME
<?php
class MinhasFuncoes
{
public static function capturarPrimeiroNome($nome_completo)
{
$resultado = explode(" ", $nome_completo);
$nome = $resultado[0];
return $nome;
}
@RigoLigoRLC
RigoLigoRLC / template.svg
Created April 13, 2024 07:33
红色电音极地大冲击模板 (CC BY-NC 4.0)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cywang117
cywang117 / preload-any-supervisor-version-onto-balena-os.md
Last active April 19, 2024 14:41
Preload any Supervisor onto balenaOS image

Replace loopN with loop number listed with partx command

Download & mount .img

balena os download raspberrypi4-64 -o rpi4.img
losetup -fP --show rpi4.img
mount /dev/loopNp6 $MOUNTPOINT 

If the mount fails with wrong fs type or similar, this is most likely because the image is a flasher image (i.e. for Intel NUC, for example), and you will need to do the following:

@martinlabate
martinlabate / blish-on-steam-deck.md
Last active April 19, 2024 14:41
How to run BlishHUD on Steam Deck

Getting BlishHUD to work correctly on the Deck

Intro

This guide will show you how to use BlishHUD while playing GuildWars2 on the Steam Deck, but requires you to launch the game from the Steam Desktop without BigPicture.

Requirements

  • Guild Wars 2 installed via Steam
  • Blish HUD downloaded

Configure the Deck