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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/" | |
} | |
export PS1='\[\e[\033[01;34m\]\u@\h \[\e[38;5;211m\]\W\[\e[\033[38;5;48m\] $(parse_git_branch)\[\e[\033[00m\]\$ ' |
netsh interface portproxy add v4tov4 listenport=3333 listenaddress=0.0.0.0 connectport=3333 connectaddress=<YOUR_IP>
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
# For mysql use root/root as user/password | |
# For ftp use admin/123 as user/password | |
version: "3.3" | |
services: | |
db: | |
image: mysql | |
container_name: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always |
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 getExcerpt(htmlString, length) { | |
const span = document.createElement("span"); | |
span.innerHTML = htmlString; | |
const outputString = span.textContent || span.innerText; | |
if (outputString.length > length) { | |
// obtendo os *length* primeiros caracteres sem quebrar palavras | |
// usando flag s para tratar a string como single line | |
const exp = new RegExp(`^(.{${length}}[^\\s]*).*`, "s"); |
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
Possible values for ext-name: | |
bcmath | |
bz2 | |
calendar | |
ctype | |
curl | |
dba | |
dom | |
enchant |
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 dev='cd d:/Felipe/Dev' | |
alias dev-react='dev && cd React' | |
alias dev-react-native='dev && cd ReactNative' | |
alias dev-vue='dev && cd Vue' | |
alias dev-flutter='dev && cd Flutter' | |
alias dev-adb='cd ~/AppData/Local/Android/Sdk/platform-tools/' | |
alias react-native-menu='dev-adb && ./adb shell input keyevent 82' |
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
/** Adicionando campo obrigatorio_credenciamento à sf_eventos */ | |
ALTER TABLE [dbo].[sf_eventos] ADD obrigatorio_credenciamento TINYINT NOT NULL DEFAULT 0; | |
GO | |
EXEC sys.sp_addextendedproperty | |
@name=N'MS_Description', @value=N'0 => não permite credenciamento, 1 => credenciamento opcional, 2 => credenciamento obrigatório', | |
@level0type=N'SCHEMA', @level0name=N'dbo', | |
@level1type=N'TABLE', @level1name=N'sf_eventos', | |
@level2type=N'COLUMN', @level2name=N'obrigatorio_credenciamento' | |
GO |
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
/** Limpar eventos de teste */ | |
DECLARE @eventoId int = 8; | |
DELETE FROM sf_eventos_ambientes WHERE id_evento >= @eventoId; | |
DELETE FROM sf_eventos_configuracao WHERE id_evento >= @eventoId; | |
DELETE FROM sf_ingresso WHERE id_evento >= @eventoId; | |
DELETE FROM sf_eventos WHERE id >= @eventoId; | |
SELECT * FROM sf_eventos; | |
SELECT * FROM sf_eventos_ambientes; |
NewerOlder