Skip to content

Instantly share code, notes, and snippets.

View rafaelmonteiroarj's full-sized avatar
🏠
Working from home

Rafael Monteiro Arjonas rafaelmonteiroarj

🏠
Working from home
View GitHub Profile
@zerobugs-oficial
zerobugs-oficial / captcha_tradicional.js
Created November 23, 2020 16:24
Script que quebra captchas tradicionais (imagem com letras e números) usando a API do 2captcha.com e o Node.js
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)
@zerobugs-oficial
zerobugs-oficial / recaptcha_v2.js
Last active September 15, 2022 21:15
Robô que quebra captchas Recaptcha V2 usando Node.js, 2captcha.com e o Pupppeteer
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);
@dfbq91
dfbq91 / LambdaNodeCrud.js
Created October 2, 2020 16:06
Lambda Functions with Nodejs CRUD with DynamoDB
/* Here, there are GET, POST, PUT and DELETE implementations for Lambda functions with Nodejs CRUD using Dynamo DB.
Before the implementation using API Gateway, I used a passed parameter. This implementations are commented */
// GET doesn't change if we are using API Gateway
'use strict';
const AWS = require('aws-sdk'); // Load the AWS SDK for Node.js
@jamesreggio
jamesreggio / react-forwardref-simple-example.js
Last active January 8, 2023 21:40
Simple example usage of React.forwardRef()
// EmailInput wraps an HTML `input` and adds some app-specific styling.
const EmailInput = React.forwardRef((props, ref) => (
<input ref={ref} {...props} type="email" className="AppEmailInput" />
));
class App extends Component {
emailRef = React.createRef();
render() {
return (
@oukayuka
oukayuka / UserSearchForm.tsx
Last active October 10, 2021 08:34
Formik sample with TypeScript
import { InjectedFormikProps, withFormik } from 'formik';
import * as React from 'react';
import * as Yup from 'yup';
interface FormValues {
login: string;
}
interface FormProps {
login?: string;
@demonixis
demonixis / toggleFullscreen.js
Created March 18, 2013 16:07
A simple function to toggle fullscreen in JavaScript. It work well on Firefox and Webkit browsers.
/**
* Toggle fullscreen function who work with webkit and firefox.
* @function toggleFullscreen
* @param {Object} event
*/
function toggleFullscreen(event) {
var element = document.body;
if (event instanceof HTMLElement) {
element = event;