Skip to content

Instantly share code, notes, and snippets.

# Instalação
# curl -s https://gist.githubusercontent.com/denoww/983566e9653cbef4b5e40ffce029582b/raw | bash -s install_lib
# ou
# wget -O - https://gist.githubusercontent.com/denoww/983566e9653cbef4b5e40ffce029582b/raw | bash -s install_lib
# $ scflutter
# IOS Manuais api
# https://developer.apple.com/documentation/appstoreconnectapi
# ANDROID Manuais api
@denoww
denoww / bash_aliases
Last active January 19, 2024 17:10
.bash_aliases
update_alias=false
for i in $*; do
if [ "$i" == "update_alias" ] ; then
update_alias=true
continue
fi
echo "Command not found $i"
done
@denoww
denoww / sc
Last active June 8, 2023 13:31
# How to install
# wget -O - https://gist.githubusercontent.com/denoww/a1acfd75198e743e31e1f6a127244ced/raw | bash -s install
# Para ver exemplos de como usar faça
# $ sc
LIB_DIR="/usr/local/bin"
LIB_PATH="$LIB_DIR/sc"
REGION='us-east-1'
CHECK="do while"
while [[ ! -z $CHECK ]]; do
PORT=$(( ( RANDOM % 30000 ) + 1025 ))
CHECK=$(sudo netstat -ap | grep $PORT)
done
echo $PORT
-------- Intelbras -------------------------------------------------------
rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0
-------- Luxvision -------------------------------------------------------
rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp
-------- Hikvision -------------------------------------------------------
rtsp://usuário:senha@ip:porta/Streaming/Channels/101
_work=~/workspace
_sc=$_work/seucondominio/
# Criando atalhos
wget https://gist.githubusercontent.com/denoww/4a53c2fe43e67979a433f6ef446d11a2/raw -O ~/.bash_aliases && source ~/.bash_aliases
# Clone o repo
mkdir -p $_work
git -C $_work clone git@github.com:denoww/seucondominio.git
git -C $_sc checkout tools
folder=~/.config/sublime-text
# folder=~/.config/sublime-text-3
# limpa configuração anterior caso tiver sido feita
rm -rf $folder/.git
rm -rf $folder/Installed\ PackagesOLD
rm -rf $folder/PackagesOLD
rm -rf $folder/.gitignore
rm -rf $folder/README.md
#!/bin/bash
# instala o curl
sudo apt-get install -y curl
# carregando configurações via params
# for i in $*
# do
# if [[ "$i" == '-y' || "$i" == '-Y' ]] ; then
# all_alowed=true
#!/bin/bash
# cx stacks list
# cx servers list -s stacks.name
has_cx_command="$(command -v cx)"
if [ $has_cx_command ]; then
stacks_list="$(cx stacks list | grep -P '^(?!NAME)' | grep -Eo '^\S*')"
for stack in $stacks_list; do
echo "=========== stack '$stack' ==========="
name_serv=$(echo "$stack" | sed 's/seucondominio_//' | sed 's/_.*$//')
servers_list="$(cx servers list -s $stack | grep -Eo '^\S*')"
@denoww
denoww / config_sc_rails_server.sh
Last active January 13, 2021 14:17
config_erp_production
# execute no servidor o comando
# wget -O - https://gist.githubusercontent.com/denoww/08f7abbed2ea46475d24a7e9b51fb70d/raw/config_sc_rails_server.sh | bash
#!/bin/bash
# pt-BR
sudo locale-gen pt_BR.UTF-8
# postgresql-client-12 - psql
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -