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
function encodeChar(ch) { | |
const lo = ch.charCodeAt(0) & 0xFF; | |
// U+1F600 até U+1F6FF são emojis de faces e similares | |
const codePoint = 0x1F600 + lo; | |
return String.fromCodePoint(codePoint); | |
} | |
// Ofusca a string de entrada | |
function obfuscate(input) { | |
let obf = ''; |
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
// Create canvas and append to body | |
const canvas = document.createElement('canvas'); | |
document.body.appendChild(canvas); | |
// Set styles to make the canvas cover the entire viewport | |
Object.assign(canvas.style, { | |
position: 'absolute', | |
top: '0', | |
left: '0', | |
width: '100%', |
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
function callableTarget() {} | |
const misterio = new Proxy( | |
callableTarget, | |
{ | |
apply(target, thisArg, args) { | |
if (args.length) { | |
return `Porque me chamou com esses argumentos: ${args}`; | |
} | |
return ['a', 'b']; |
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
callback({ | |
"status": "success", | |
"message": "JSONP callback executed successfully", | |
"data": { | |
"id": 123, | |
"value": "Hello, world!" | |
} | |
}); |
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
// On this example i can add or remove routes and no need to stop ou restart the server | |
const http = require('http'); | |
// nothing before will be updated if there are changes | |
require('./node-reload') // Does not change the caller file, requiring on the start is best | |
// any require from here will be updated if there are changes | |
// Criando o servidor HTTP | |
const server = http.createServer((req, res) => { |
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
# Doc: https://learn.microsoft.com/en-us/windows/wsl/wsl-config | |
# Settings apply across all Linux distros running on WSL 2 | |
[wsl2] | |
# Limits VM memory to use no more than 10 GB, this can be set as whole numbers using GB or MB | |
memory=10GB | |
# Sets the VM to use two virtual processors | |
processors=2 |
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
import { GoogleGenerativeAI } from "@google/generative-ai"; | |
const API_KEY = "KKKKKKEEEEEEEEEYYYYYYYYYY"; | |
const genAI = new GoogleGenerativeAI(API_KEY); | |
const generationConfig = { | |
temperature: 0.9, | |
}; | |
// Modelo 'gemini-pro' para chat | |
const model = genAI.getGenerativeModel({ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Flow Field Simulation</title> | |
<style> | |
canvas { | |
border: 1px solid black; | |
} | |
</style> |
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
1. Press WINDOWS KEY + R | |
2. Type in "RegEdit" | |
3.Navigate on to | |
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options | |
Create a new Key: | |
"yourgame.exe" | |
Create another Key: |
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
interface INode { | |
value: number; | |
right?: Node; | |
left?: Node; | |
} | |
class Node implements INode { | |
value: number; | |
right?: Node; | |
left?: Node; |
NewerOlder