View sqs.mjs
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
import { SQSClient, ReceiveMessageCommand } from "@aws-sdk/client-sqs"; | |
import { join } from 'node:path' | |
import { fileURLToPath } from 'node:url' | |
import { writeFile } from 'node:fs/promises' | |
const QueueUrl = "" | |
const client = new SQSClient({ region: "sa-east-1" }); | |
const TARGET_DIR = join(fileURLToPath(new URL('.', import.meta.url)), 'data') |
View captcha_tradicional.js
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 request = require('request'); | |
const fs = require('fs'); | |
const puppeteer = require('puppeteer'); | |
const API_KEY = "SUA_API_KEY_DO_2captcha"; | |
async function curl(options) { | |
return new Promise((resolve, reject) => { | |
request(options, (err, res, body) => { | |
if(err) |
View recaptcha_v2.js
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 request = require('request'); | |
const puppeteer = require('puppeteer'); | |
const API_KEY = "SUA_API_KEY_NO_2captcha" | |
async function curl(options) { | |
return new Promise((resolve, reject) => { | |
request(options, (err, res, body) => { | |
if(err) | |
return reject(err); |
View validar-cpf-elixir
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
# Primeira versão, ainda precisa verificar se tem 11 dígitos | |
# Devolver true/false | |
# Tratar excessão de caracteres inválidos | |
defmodule Cpfcalc.Valid do | |
def calc(cpf) do | |
String.codepoints(cpf) | |
|> Enum.map(fn d -> String.to_integer(d) end) | |
|> IO.inspect() | |
|> calcD10() |
View docker-daemon.json
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
{ | |
"bip": "172.16.8.1/24", | |
"fixed-cidr": "172.16.8.0/24", | |
"ipv6": true, | |
"fixed-cidr-v6": "ipv6-range/80" | |
} | |
View npm-run-prod-at-git-pre-push
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
# file: pre-push | |
#!/bin/sh | |
# An example hook script to verify what is about to be pushed. Called by "git | |
# push" after it has checked the remote status, but before anything has been | |
# pushed. If this script exits with a non-zero status nothing will be pushed. | |
# | |
# This hook is called with the following parameters: | |
# |
View switch-sound-microphone
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/sh | |
switchMicrophone () { | |
# get first device by param $1 | |
# param = device's name or part of device's name | |
DEVICE=$(pacmd list-sources | grep -i "name:" | grep -i $1 | head -n 1 | grep -o "[^<]*$" | grep -o "[^>]*") | |
# set device | |
echo -e "Device selected: \e[32m${DEVICE}\e[39m" | |
pacmd set-default-source $DEVICE |
View after-activating-the-network
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/sh | |
# | |
# ifup hook script for resolvconf | |
# | |
# This file is part of the resolvconf package. | |
# | |
# Interface of the internet | |
INTERFACE=`route | grep '^default' | grep -o '[^ ]*$'` |
View check_email.php
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
/** | |
* Class to check up e-mail | |
* | |
* @author Konstantin Granin <kostya@granin.me> | |
* @copyright Copyright (c) 2010, Konstantin Granin | |
*/ | |
class VerifyEmail { | |
/** |
View optimus.desktop
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
[Desktop Entry] | |
Type=Application | |
Name=Optimus | |
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto" | |
NoDisplay=true | |
X-GNOME-Autostart-Phase=DisplayServer |
NewerOlder