This file contains hidden or 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
{ | |
// Define o tema do VSCode | |
"workbench.colorTheme": "Dracula", | |
// Configura tamanho e família da fonte | |
"editor.fontSize": 12, | |
"editor.lineHeight": 24, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"editor.formatOnSave": false, |
This file contains hidden or 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
module.exports = { | |
env: { | |
es6: true, | |
node: true | |
}, | |
extends: ["airbnb-base"], | |
globals: { | |
Atomics: "readonly", | |
SharedArrayBuffer: "readonly" | |
}, |
This file contains hidden or 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
const { resolve } = require('path'); | |
module.exports = { | |
'config': resolve(__dirname, 'src', 'config', 'database.js'), | |
'models-path': resolve(__dirname, 'src', 'app', 'models'), | |
'seeders-path': resolve(__dirname, 'src', 'database', 'seeders'), | |
'migrations-path': resolve(__dirname, 'src', 'database', 'migrations'), | |
}; |
This file contains hidden or 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
module.exports = { | |
dialect: 'postgres', | |
host: 'localhost', | |
username: 'user', | |
password: 'password', | |
database: 'database', | |
define: { | |
timestamps: true, | |
underscored: true, |
This file contains hidden or 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
const validate = (value) => { | |
if (!parseFloat(value)) { | |
setQuantity(''); | |
setSubTotal(0); | |
return; | |
} | |
const valueStr = value.toString().replace(',', '.'); | |
if ((valueStr.match(/\./gi) || []).length > 1) return; | |
This file contains hidden or 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
useEffect(() => { | |
let isUnmonted = false; | |
const runAsync = async () => { | |
try { | |
if (!isUnmonted) { } // Performa o update | |
} catch (e) { | |
if (!isUnmonted) { } // Gerencia o erro | |
} | |
}; |
This file contains hidden or 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
package com.simpleChat; | |
import org.jgroups.*; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
// Reference: http://www.jgroups.org/tutorial/#_configuration | |
public class SimpleChat extends ReceiverAdapter{ | |
/* | |
* JGroups uses a JChannel as the main API to connect to a cluster, send and receive messages, and to register |
This file contains hidden or 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://unix.stackexchange.com/questions/62818/how-can-i-switch-between-different-audio-output-hardware-using-the-shell | |
CURRENT_PROFILE=$(pacmd list-cards | grep "active profile" | cut -d ' ' -f 3-) | |
if [ "$CURRENT_PROFILE" = "<output:hdmi-stereo>" ]; then | |
pacmd set-card-profile 0 "output:analog-stereo+input:analog-stereo" | |
else | |
pacmd set-card-profile 0 "output:hdmi-stereo" | |
This file contains hidden or 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
/*eslint-disable */ | |
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin'); |
This file contains hidden or 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
var i = 0; | |
var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length; | |
myTimer(); | |
function myTimer () { | |
if (count == 0) return; | |
el = document.querySelector('.ytd-subscribe-button-renderer'); | |
el.click(); |
OlderNewer