Skip to content

Instantly share code, notes, and snippets.

View caioagiani's full-sized avatar
💼
Working at home

Caio Agiani caioagiani

💼
Working at home
View GitHub Profile
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"ruby.rubocop.onSave": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
/* End autofix */
// "standard.autoFixOnSave": true,
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
[
{
"IBGE": 2700300,
"state": "Alagoas",
"city": "Arapiraca",
"provider": "Ginfes"
},
{
"IBGE": 2704302,
"state": "Alagoas",
@caioagiani
caioagiani / check_price.sh
Last active March 19, 2022 00:03
[Mobizon BR] - check current price
curl --request POST \
--url 'https://api.mobizon.com.br/service/price/listpublic?output=json&api=v1&apiKey=YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data countryA2=BR \
--data currency=BRL \
--data language=br
[
{
"id": "8610",
"id_estado": "26",
"nome": "Adamantina"
},
{
"id": "8611",
"id_estado": "26",
"nome": "Adolfo"
const accessToken = [
'fe98abc7',
'33577d71',
'fbcaf2bd',
'ab60acb4'
];
const key = accessToken[~~(Math.random() * accessToken.length)];
console.log({ key });
<!DOCTYPE html>
<html lang="en">
<head>
<title>International telephone input</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css"
/>
export const userAgents = [
'Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0; tr) Opera 10.10',
'Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; de) Opera 10.10',
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; FDM; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; Tablet PC 2.0)',
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.2; .NET4.0C; .NET4.0E)',
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; AskTB5.5)',
'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C)',
'Mo
{
"code":200,
"data":{
"auto":"Detect Language",
"af":"Afrikaans",
"sq":"Albanian",
"am":"Amharic",
"ar":"Arabic",
"hy":"Armenian",
"az":"Azerbaijani",
function interceptNetworkRequests(ee) {
const open = XMLHttpRequest.prototype.open;
const send = XMLHttpRequest.prototype.send;
const isRegularXHR = open.toString().indexOf('native code') !== -1;
// don't hijack if already hijacked - this will mess up with frameworks like Angular with zones
// we work if we load first there which we can.
if (isRegularXHR) {