This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accent: "#80cbc4" | |
background: "#263238" | |
foreground: "#eeffff" | |
details: "darker" | |
terminal_colors: | |
bright: | |
black: "#464b5d" | |
green: "#c3e88d" | |
cyan: "#89ddff" | |
red: "#f07178" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const helpMeTo = { | |
get: { | |
entry: { | |
from: (array) => { | |
return { | |
where: (property) => { | |
return { | |
equalsTo: (value) => { | |
return array.find((item) => item[property] === value); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const useClassName = (...args) => { | |
const parse = (classNames) => { | |
let actualClassNames = []; | |
if ('string' === typeof classNames) { | |
actualClassNames.push(classNames); | |
} | |
else if (Array.isArray(classNames)) { | |
for (const className of classNames) { | |
actualClassNames = actualClassNames.concat(parse(className)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
history = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) | |
remove = reset HEAD -- | |
restore = checkout -- | |
rollback = reset --soft HEAD~1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var previousPoint = null; | |
$("#selector").on("plothover", function(event, pos, item) { | |
if (item) { | |
if (previousPoint != item.dataIndex) { | |
previousPoint = item.dataIndex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
É interessante: | |
• Considerar itens frágeis | |
• Considerar posição item (quando precisar) | |
• O objeto possuir medidas específicas para envio. Por exemplo: o objeto dobra ou é flexível, como no caso de tecidos | |
• Empacotar objetos maiores primeiro | |
• Posicionar ao lado dos itens já empacotados anteriormente, se couber | |
• Não permitir saliências para que não haja dobras/quebras durante o trânsito (lados lisos) | |
• Balancear caixas para que não haja muita discrepância de tamanho e peso. Por exemplo: Três caixas médias, são melhores do que 1 caixa pequena e 2 grandes, por exemplo | |
• Exibir modelo 3D com o resultado |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @@session.foreign_key_checks = 0; | |
SET @@global.connect_timeout = 200; | |
SET @@session.max_allowed_packet = 16M; | |
SET @@session.wait_timeout = 200; | |
SET @@session.interactive_timeout = 200; | |
SET @@session.net_read_timeout = 200; | |
SET @@session.net_write_timeout = 200; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Declaração de variáveis | |
LIP: Largura da imagem principal | |
AIP: Altura da imagem principal | |
MIP: Margem da imagem principal | |
LMI: Largura da miniatura | |
AMI: Altura da miniatura | |
MMI: Margem da miniatura | |
NMI: Número de miniaturas | |
NMA: Número de margens de miniaturas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function merge_white_spaces($string) { | |
// Remove multiple line breaks | |
$string = preg_replace("/[\n\r]{3,}|[\r\n]{3,}|[\n]{3,}|[\r]{3,}/", PHP_EOL . PHP_EOL, $description); | |
// Remove tabs | |
$string = preg_replace("/\t+/", "", $description); | |
// Remove multiple spaces (the character " " is used instead \s because the second removes line breaks too) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.limit = function(size, cutWord, suspensionPoints) { | |
var str = this; | |
cutWord = typeof cutWord == "undefined" ? true : cutWord; | |
if (typeof size == "number" && size > 0 && str.length >= size) { | |
str = str.substr(0, size); | |
if (!cutWord) { | |
str = str.substr(0, Math.min(str.length, str.lastIndexOf(" "))); |
NewerOlder