Skip to content

Instantly share code, notes, and snippets.

View BinaryLeo's full-sized avatar
🌏
Home

Leonardo Augusto BinaryLeo

🌏
Home
View GitHub Profile
@BinaryLeo
BinaryLeo / index.html
Created January 28, 2024 04:38
infinite carousel
<div class="items">
<div class="item active">
<img src="http://via.placeholder.com/500x500">
</div>
<div class=" item next">
<img src="http://via.placeholder.com/500x500">
</div>
<div class="item">
<img src="http://via.placeholder.com/500x500">
</div>
@BinaryLeo
BinaryLeo / firebase-message
Created October 9, 2022 02:42 — forked from Albejr/firebase-message
Localize Firebase error messages in PT-BR
catchError(err => {
const errorCode = err.code;
let errorMessage = this.VerifyErroCode(errorCode);
if (errorMessage == null) {
errorMessage = err.message;
}
console.log(errorMessage);
})
{"version":1,"resource":"file:///home/binaryleo/Documents/react_native_everyday_finances/src/components/TransactionCard/index.tsx","entries":[{"id":"HYY6.tsx","timestamp":1660098356626},{"id":"vwwH.tsx","source":"Workspace Edit","timestamp":1660099147232}]}
@BinaryLeo
BinaryLeo / hs610_config.sh
Created July 9, 2022 16:04 — forked from mariacamilarg/hs610_config.sh
How to configure Huion HS610 in Ubuntu
# installing
git clone https://github.com/DIGImend/digimend-kernel-drivers
cd digimend-kernel-drivers
dpkg-buildpackage -b -uc
sudo dpkg -i ../digimend-dkms_10_all.deb
# sudo reboot
# uninstalling
sudo modprobe -r hid-kye hid-uclogic hid-polostar hid-viewsonic
sudo apt-get remove digimend-dkms
@BinaryLeo
BinaryLeo / readmeEmoji.md
Created July 9, 2022 15:10 — forked from kajal1106/readmeEmoji.md
Readme Emoji

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,
legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}
ul{list-style:none}button,input,select{margin:0}
html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}
img,video{height:auto;max-width:100%}
iframe{border:0}
table{border-collapse:collapse;border-spacing:0}
td,th{padding:0}
@BinaryLeo
BinaryLeo / webpack.config.js
Last active April 30, 2022 17:42
webpack base file
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const isDevelopment = process.env.NODE_ENV !== 'production'
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin')
module.exports = {
mode: isDevelopment ? 'development' : 'production', //set to production for production mode or development for development mode
devtool: isDevelopment ? 'eval-source-map' : 'source-map', //source map for debugging
entry: path.resolve(__dirname, 'src', 'index.tsx'),
// override the default output path / to avoid conflicts with the dist folder
@BinaryLeo
BinaryLeo / dateFormat.js
Created February 7, 2022 22:39
Validate dates (No regex)
const date = new Date()
const options ={
year:"numeric",
month:"long",
day:"numeric"
}
/* const actual = date.toLocaleDateString("pt-br",options)
const expected = "07 de fevereiro de 2022" */
@BinaryLeo
BinaryLeo / dictionary.py
Last active January 30, 2022 02:25
Python Dictionaries
# 1. Dicionário simples que aceita apenas strings e identificadores corretos. São indicados para pequenos dicionários.
dicionario ={'1','2','3'}
print(dicionario)
dcionario ={'1','2','3'}
# 2. Dicionário simples que aceita apenas strings . As chaves são passadas com um parâmetro nomeado de dict
dicionario = dict (Brazil='RJ', USA='NY', Mexico='Cidade do Mexico')
print(dicionario)