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
package com.exercicio.aula17exerciciojsonobject; | |
import org.json.simple.JSONArray; | |
import org.json.simple.JSONObject; | |
import org.json.simple.parser.JSONParser; | |
import org.json.simple.parser.ParseException; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import java.io.FileNotFoundException; |
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
package com.exercicio.aula17exerciciojsonobject; | |
import org.json.simple.JSONArray; | |
import org.json.simple.JSONObject; | |
import org.json.simple.parser.JSONParser; | |
import org.json.simple.parser.ParseException; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import java.io.FileNotFoundException; |
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
//Funcao que pega um elemento na tela de forma assincrona | |
function getElementAsync(selector) { | |
return new Promise((resolve, reject) => { | |
const element = null; | |
const idInterval = setInterval(() => { | |
try { | |
const element = document.querySelector(selector); | |
if (element) { | |
clearInterval(idInterval); |
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
SELECT | |
`TABLE_SCHEMA`, -- Foreign key schema | |
`TABLE_NAME`, -- Foreign key table | |
`COLUMN_NAME`, -- Foreign key column | |
`REFERENCED_TABLE_SCHEMA`, -- Origin key schema | |
`REFERENCED_TABLE_NAME`, -- Origin key table | |
`REFERENCED_COLUMN_NAME` -- Origin key column | |
FROM | |
`INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE` -- Will fail if user don't have privilege | |
WHERE |
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
#!bin/bash | |
# ----------------------------- VARIÁVEIS ----------------------------- # | |
#PPA | |
#[NENHUMA AINDA] | |
#URL | |
URL_GOOGLE_CHROME="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" | |
#DIRETORIO | |
DIRETORIO_DOWNLOADS="$HOME/Downloads/programas" |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/home/lgrwolf/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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 conectOneMore() { | |
var nToConnect = document.querySelectorAll('button[aria-label^="Conecte-se"]').length; | |
console.log('Número para se conectar: ' + nToConnect); | |
var nToFollow = document.querySelectorAll('button[aria-label^="Seguir"]').length; | |
console.log('Número para seguir: ' + nToFollow); | |
if (nToConnect > 0) { | |
setTimeout(() => { | |
if (document.querySelector('button[aria-label^="Conecte-se"]')) |
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
//<IFRAME> | |
var playbackRate = 3; | |
var data = {event: 'command', func: 'setPlaybackRate', args: [playbackRate, true]}; | |
var message = JSON.stringify(data); | |
$('iframe')[0].contentWindow.postMessage(message, '*'); | |
//<ALL IFRAMES WITHOUT JQUERY> | |
var playbackRate = 3; | |
var data = {event: 'command', func: 'setPlaybackRate', args: [playbackRate, true]}; | |
var message = JSON.stringify(data); |
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
SET FOREIGN_KEY_CHECKS = 0; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT('`', table_schema, '`.`', table_name, '`') INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = 'database_name'; -- specify DB name here. | |
SET @tables = CONCAT('DROP TABLE ', @tables); | |
PREPARE stmt FROM @tables; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; |
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
{ | |
//!Settings of Oh My Zsh | |
"terminal.integrated.shell.linux": "/bin/zsh", | |
"terminal.integrated.shell.osx": "/bin/zsh", | |
"terminal.integrated.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback', 'PowerlineSymbols'", | |
// "workbench.colorTheme": "Monokai", | |
"editor.fontSize": 15, | |
"editor.lineHeight": 26, | |
"editor.tabSize": 2, |
NewerOlder