Skip to content

Instantly share code, notes, and snippets.

@scriptdev
scriptdev / .css
Created December 6, 2023 04:46
CRIAR ESPAÇAMENTO AÇÃO DO DATAGRID ( ADIANTI )
td.tdatagrid_cell.action {
padding-right: 15px !important;
}
@scriptdev
scriptdev / .html
Created December 11, 2023 02:38
TEMPLATE IMAGEM HTML
<!--[main]-->
<div>
<img style="height:200px !important" src="{{URL}}">
</div>
<!--[/main]-->
@scriptdev
scriptdev / .php
Created December 10, 2023 23:04
EXTRAIR DDD e NÚMERO DO CELULAR
<?php
$celular = str_replace(['(',')','-',' '], ['','','',''], '(83) 98655-6461');
$ddd = substr($celular, 0, 2); # 83
$numero = substr($celular, 2); # 986556461
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 19, 2024 01:54
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@scriptdev
scriptdev / .css
Created December 6, 2023 18:20
MUDAR COR DE FUNDO DA LINHA NO DATAGRID
.tdatagrid_cell{
background-color:#ffffff !important;
}
@cmparlettpelleriti
cmparlettpelleriti / R_EigenPCA_Plots.R
Last active April 19, 2024 01:51
Show students the relationship between Eigendecomp of Cor/Cov and the % variance explained for PCs
library(tidyverse)
library(MASS)
library(patchwork)
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# generate data with given cor matrix
a <- 0.9
s1 <- matrix(c(1,a,
a,1), ncol = 2)
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@MikuroXina
MikuroXina / endless-error-loop.py
Created December 26, 2022 15:50
Lyrics of "Endless Error Loop" by Neko Hacker feat. ななひら.
print('''<header>
ここをもうちょっとシンプルに変えてっと
え、なにこのエラー・・・
</header>''')
try:
uglyCode()
except:
print('よくあるError')
try:
@scriptdev
scriptdev / .php
Last active April 19, 2024 01:48
DEFINIR OS BOTÕES DE AÇÃO DO THtmlEditor
<?php
$html = new THtmlEditor('texto');
$html->setOption('toolbar',[
['style', ['bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
@scriptdev
scriptdev / .php
Created December 12, 2023 16:38
RETORNAR IDS ARRAY DOS REGISTROS VINCULADOS
<?php
$GruposCliente = GruposCliente::where('cliente_id', '=', $object->id)->getIndexedArray('grupo_cliente_id', 'grupo_cliente_id');
/*
Array
(
[1] => 1
[2] => 2
[4] => 4