Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .php
Created June 25, 2021 15:56
CRIAR SEQUENCIAL NA COLUNA DO DATAGRID
<?php
/*
1 - CRIE UMA COLUNA NO DATAGRID PARA POR O SEQUENCIAL
2 - CRIE UMA NOVA TRANSFORMAÇÃO E COLOQUE O CÓDIGO ABAIXO:
*/
static $sequencial;
$sequencial++;
if(isset($_GET['offset']) and $sequencial < $_GET['offset'])
@sousagarcia
sousagarcia / .php
Created June 29, 2021 12:38 — forked from scriptdev/.php
VALIDAR SE OS ITENS DO MESTRE DETALHE TEM DADOS ANTES DE SALVAR
<?php
if(!isset($param['datagrid_itens__row_data']))
{
new TMessage('error', 'ADICIONE UM ITEM!');
return;
}
@fishchev
fishchev / index.html
Last active April 19, 2024 15:14
Minimal page structure/sample to trigger Telegram's IV template for https://teletype.in.
<!DOCTYPE html>
<head>
<title>$title</title>
<meta property="og:site_name" content="$site_name">
<meta property="og:description" content="$description">
<meta property="article:author" content="$author">
<!-- $image_url / link preview image is set using og:image property -->
<!-- <meta property="og:image" content="http://example.com/img.jpeg"> -->
<meta property="telegram:channel" content="@cor_bee">
@hekmon
hekmon / README.md
Last active April 19, 2024 15:13
EDF Tarif Bleu prices within Home Assistant

Simply include the file within your configuration.yaml file like this:

# ...
input_number: !include input_numbers.yaml
# ...

Restart your Home Assistant to update the values (reloading YAML will not be enough).

@davispuh
davispuh / steam_console_params.txt
Last active April 19, 2024 15:13
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accesscode -
-all_languages - show longest loc string from any language
-batterytestmode - rapidly cycle battery percentages for testing
-bigpicture - Start in Steam Big Picture mode
-blefw -
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 19, 2024 15:13
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@scriptdev
scriptdev / .php
Last active April 19, 2024 15:12
CALCULAR SALDO ACUMULADO NA COLUNA DO DATAGRID (FLUXO DE CAIXA)
<?php
public function onReload($param = NULL)
{
# DEFINE A VARIÁVEL SALDO ANTERIOR
$saldo_anterior = 0;
# PEGA OS DADOS DOS CAMPOS DO FORMULÁRIO
$data = $this->form->getData();
@jstarry
jstarry / README.md
Last active April 19, 2024 15:12
2024-04-19 Devnet restart instructions

Summary

For a very long time the devnet snapshot was slightly corrupted in a way that wouldn't cause an issue until crossing the epoch boundary between 678 and 679. In order to get the cluster running again, devnet nodes will need to patch the corrupted snapshot themselves or download a new one and then restart with updated validator args detailed below.

Step 1: Create a snapshot at slot 293327999

(Optional) Download new snapshot instead of creating it

Since it's devnet, it's not as critical to ensure ledger integrity (but it is good practice!). If you so wish, you can download the ledger from one of the

@scriptdev
scriptdev / .php
Created July 3, 2021 22:56
ADICIONAR HTML NO FORMULÁRIO
<?php
// CARREGA O CONTEÚDO HTML NA VARIÁVEL $html
$html = new THtmlRenderer('app/resources/arquivo.html');
// CRIA UMA ARRAY E ATRIBUI O VALOR PARA SUBSTITUIR
$parametro = array();
$parametro['nome'] = 'FABRICIO';
// FAZ A SUBSTITUIÇÃO DO PARÂMETRO NO ARQUIVO HTML
@scriptdev
scriptdev / .php
Last active April 19, 2024 15:11
IMPORTAÇÃO DE CSV
<?php
public function onCSV($param = null)
{
try
{
// PEGA O NOME DO ARQUIVO
$fileName = json_decode(urldecode($param['NOME_CAMPO_TFile']))->fileName;
// ABRE O ARQUIVO