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
const SECRET_KEY = "YOUR API KEY"; | |
const MAX_TOKENS = 3000; | |
const TEMPERATURE = 0.9; | |
function EMAILALUNO(aluno, nota) { | |
const url = "https://api.openai.com/v1/chat/completions"; | |
const payload = { | |
model: 'gpt-3.5-turbo', | |
messages: [ | |
{ role: "system", content: "Crie um parágrafo de incentivo para um aluno que recebeu uma nota na prova. Vou passar o nome do aluno e a nota." }, |
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 | |
# Retorna o tempo total em segundos de um arquivo do ScreenFlow | |
# | |
# Requisito: Dar permissão de acessibilidade pro Terminal ou outra App que vai executar | |
# (System Preferences > Security & Privacy > Privacy > Accessibility > Add Application) | |
file=$1 | |
if [ "$file" = "" ] || [ ! -d "$file" ]; then | |
echo Passe o nome do arquivo pra detectar a duração |
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 | |
for PAGINA in {1..2}; do | |
curl -s -L https://jovemnerd.com.br/categoria/nerdnews/page/$PAGINA/ | sed -n 's/.*href="\(https:\/\/jovemnerd.com.br\/nerdnews\/[^"]*\).*/\1/p' | |
done | \ | |
while read link; do | |
curl -s $link > /tmp/nerdtech.html | |
xmllint --html --xpath '//div[@class="title"]/h2/text()' /tmp/nerdtech.html 2> /dev/null |
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(){ | |
// como vamos usar o throttle varias vezes (no scroll e no resize), | |
// encapsulei essa funcionalidade numa função | |
function throttle(fn) { | |
fn.jarodei = false; | |
return function(){ | |
if (fn.jarodei) return; | |
fn.jarodei = true; |
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
server { | |
listen 3030; | |
root /Users/alura/performance-web/site; | |
gzip on; | |
gzip_types text/css application/javascript image/svg+xml; | |
} |
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
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false | |
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | |
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true | |
defaults write com.apple.universalaccess reduceTransparency -bool true | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false | |
defaults write com.apple.finder ShowStatusBar -bool true | |
defaults write com.apple.Finder AppleShowAllFiles -bool true | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true | |
hash tmutil &> /dev/null && sudo tmutil disablelocal |
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
server { | |
listen 12000; | |
location / { | |
set $vimeo_host $arg_host; | |
resolver 8.8.8.8; | |
proxy_pass $vimeo_host; | |
proxy_buffering off; | |
} | |
} |
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
<script> | |
function whackWebkitMatchesSelector() { | |
var oldMatches = Element.prototype.webkitMatchesSelector | |
function newMatches(selector) { | |
try { | |
return oldMatches.call(this, selector) | |
} | |
catch (err) { | |
return false |
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
javascript:void(function(){ | |
var boleto = prompt(); | |
var partes = boleto.trim().split(/[^\d]+/); | |
var iframe = document.querySelector('[name="Principal"]').contentWindow.document.querySelector('[name="Corpo"]').contentWindow.document.querySelector('#iframePrinc').contentWindow; | |
var inputs = iframe.document.querySelectorAll('.lista input'); | |
for (var i = 0; i < inputs.length; i++) { | |
inputs[i].value = partes[i]; |
NewerOlder