Rhuan rhuanbarreto
-
Odda Digital System
- Between Norway and Brazil
- https://www.rhuan.com.br/site
View store.js
import { createStore, compose } from "redux"; | |
import rootReducer from "./reducers"; | |
import { offline } from '@redux-offline/redux-offline'; | |
import config from '@redux-offline/redux-offline/lib/config'; | |
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | |
export default createStore( | |
rootReducer, | |
composeEnhancers( |
View command.sh
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d |
View nginx.conf
http { | |
# SSL Settings | |
ssl_session_cache shared:SSL:20m; | |
ssl_session_timeout 180m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_session_tickets off; | |
ssl_certificate /certs/cert.crt; | |
ssl_certificate_key /certs/cert.key; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5; |
View copy-docker.sh
# Copy backup file to Docker Container | |
# Remember to name your container with the --name parameter on docker start, so you can | |
# replace the SQL_Server name on the following command. | |
# Remember also to change the backup file path. | |
docker cp ~/database.bak SQL_Server:/var/opt/mssql/data/ |
View environment
# Add this lines to the /etc/environment file. Change account name key and passphrase according to your settings | |
AZURE_ACCOUNT_NAME=storageaccountname | |
AZURE_ACCOUNT_KEY=storageaccountkey | |
PASSPHRASE=passphrase_for_GPG_encryption |
View install_homebrew.sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
View install.sh
brew install rbenv ruby-build | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile | |
source ~/.bash_profile | |
rbenv install 2.3.6 | |
rbenv global 2.3.6 | |
ruby -v | |
gem install rails -v 5.0.6 | |
rbenv rehash | |
rails -v |
View alfresco-ubuntu-install.sh
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends libice6 libsm6 libxt6 libxrender1 libfontconfig1 libcups2 libglu1-mesa libcairo2 libgl1-mesa-glx | |
cd /usr/lib/x86_64-linux-gnu | |
sudo ln -s mesa/libGL.so.1 ./libGL.so.1 | |
cd ~ | |
curl -O http://eu.dl.alfresco.com.s3.amazonaws.com/release/community/201707-build-00028/alfresco-community-installer-201707-linux-x64.bin | |
chmod +x alfresco-community-installer-201707-linux-x64.bin | |
./alfresco-community-installer-201707-linux-x64.bin --alfresco_admin_password <good admin password> --mode unattended --baseunixservice_install_as_service 1 --prefix /opt/alfresco |
View script.js
$('.form-control').on('focus blur', function (e) { | |
$(this).parents('.form-group').toggleClass('focused', (e.type === 'focus' || this.value.length > 0)); | |
}).trigger('blur'); |
View masks.js
jQuery(function($) { | |
$('#cnpj,.cnpj').mask("99.999.999/9999-99"); | |
$('#cep,.cep').mask("99.999-999"); | |
$('#telefone-fixo,.telefone-fixo').mask("(99) 9999-9999"); | |
$('#telefone-celular,.telefone-celular').mask("(99) 99999-9999"); | |
// Se for um campo input do tipo date, mostrar máscara somente no Safari e Firefox pra evitar problemas com validação e mobile | |
var isFirefox = typeof InstallTrigger !== 'undefined'; | |
var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0 || (function(p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification); | |
if (isFirefox || isSafari) { | |
$('#prazo,.prazo').mask("99/99/9999"); |
NewerOlder