gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
export function cnpjValidation(value) { | |
if (!value) return false | |
// Aceita receber o valor como string, número ou array com todos os dígitos | |
const isString = typeof value === 'string' | |
const validTypes = isString || Number.isInteger(value) || Array.isArray(value) | |
// Elimina valor em formato inválido | |
if (!validTypes) return false |
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
# coding: utf-8 | |
from ftplib import FTP | |
import log | |
import logging | |
#log.criarLog() | |
log.atualizarLog() | |
# A função abaixa um arquivo definido por 'filename' na pasta definida por local com o nome | |
# especificado por 'name' | |
def download(handler, name, filename="musica1.mp3"): |
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
# Este é o código de como ler emails do gmail | |
# discutido no calango, ele foi escrito para rodar em | |
# python 3 | |
import email | |
import imaplib | |
EMAIL = '[email protected]' | |
PASSWORD = '@Calango123' | |
SERVER = 'imap.gmail.com' |
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
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
@media (min-width:1281px) { /* hi-res laptops and desktops */ } |
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
{"lastUpload":"2021-08-04T02:58:37.455Z","extensionVersion":"v3.4.3"} |
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
https://dkbalachandar.wordpress.com/2016/07/05/thread-dump-from-a-docker-container/ | |
Thread & Heap dumps From a Docker container | |
Follow the below steps to take the thread and Heap dumps from a docker container | |
1. Run the below command to bash into the container. Please change the CONTAINER_NAME appropriately | |
docker exec -it CONTAINER_NAME bash |
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
#!/usr/bin/env bash | |
# See https://docs.docker.com/compose/environment-variables/#the-env-file | |
# Nginx | |
NGINX_HOST=devmeudominio.com.br | |
# PHP | |
PHP_VERSION=5.6.40 |
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
<p-panel styleClass="form-group" [toggleable]="true"> | |
<p-header> | |
<span>Panel Form</span> | |
</p-header> | |
<div class="ui-fluid"> | |
<div class="ui-g"> | |
<div class="ui-g-12"> | |
<app-panel-form></app-panel-form> | |
</div> | |
</div> |
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
// Script jQuery para esconder um elemento na página quando a rolagem ultrapassar 200px | |
$(window).scroll(function(){ | |
if($(document).scrollTop() > 200){// se a rolagem passar de 200px esconde o elemento | |
$('#elementoAEsconder').hide(); | |
} else { // senão ele volta a ser visivel | |
$('#elementoAEsconder').show(); |
NewerOlder