Skip to content

Instantly share code, notes, and snippets.

View dhyegocalota's full-sized avatar
🎯
I build results through Software Engineering.

Dhyego Calota dhyegocalota

🎯
I build results through Software Engineering.
View GitHub Profile
@dhyegocalota
dhyegocalota / tracking-codes.html
Last active January 8, 2024 19:21
2024.01.03 | Snapshot | Tracking Codes of ThriftyTraveler.com/Premium
<html>
<head>
<!-- Start of Google 1 -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
@dhyegocalota
dhyegocalota / Webhook | Draft Orders Update | Total of Requests | 300.txt
Last active September 1, 2022 22:23
2022.08.23 | Load Test | Shopify Webhook Endpoints
{
"version": 1,
"variables": [
{
"names": [
"shopify_request_payload_hmac_sha256",
"shopify_draft_order_id",
"shopify_order_id"
],
"values": [
@dhyegocalota
dhyegocalota / folder_structure.txt
Created March 11, 2019 19:26
DevMT Members Sample
.
├── README.md
├── app.json
├── package.json
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
├── src
│   ├── Config.js
console.log(JSON.stringify(Object.values(Array.from(document.querySelectorAll('table:nth-child(2) tbody tr')).filter((x, i) => i > 2).map(x => ({ code: x.querySelector('td:nth-child(1)').innerText.trim(), name: x.querySelector('td:nth-child(2)').innerText.trim() })).filter(x => x.code.length).reduce((acc, x) => { acc[x.code] = x; return acc }, {})), null, 2));
@dhyegocalota
dhyegocalota / highligh.sh
Created May 6, 2017 14:06
Syntax Highlight
# Custom functions
function light() {
if [ -z "$2" ]
then src="pbpaste"
else
src="cat $2"
fi
$src | highlight -O rtf --syntax $1 --style solarized-light --font-size 18 | pbcopy
}
@dhyegocalota
dhyegocalota / picker.js
Created April 18, 2017 20:51
[React Native] Picker for Native Base + React Native Navigation (by Wix)
// @flow
import React, { Component } from 'react';
import {
connectStyle,
Container,
Content,
ListItem,
Text,
Radio,
@dhyegocalota
dhyegocalota / hackaflag.js
Created March 19, 2017 21:01
[Hackflag] Web server
var wrongContent = 'nadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaaquinadaanadanadaaaannaannaanndnna';
var filesToTest = Array.from(document.querySelectorAll('td a')).filter(x => x.href.match(/\.php$/));
const testContent = (file) => {
return (response) => {
response.text()
.then(text => {
if (text.trim() != wrongContent) {
console.log(`O arquivo '${file.href}' tem o content: '${text}'`);
@dhyegocalota
dhyegocalota / migrate.sh
Created September 16, 2016 13:09
imapsync
#!/bin/sh
error() { echo "$@" 1>&2; }
file=$1
if [ -z $file ]; then
error "Usage \`./migrate credentials.txt\`"
exit 1
fi
@dhyegocalota
dhyegocalota / unique_words.js
Created July 8, 2016 18:21
Unique Words (by line)
const fs = require('fs');
var data = [];
var file = fs.readFileSync(process.argv[2], {encoding: 'utf-8'});
file
.split('\n')
.forEach(x => {
if (data.indexOf(x) === -1) {
data.push(x);
#!/bin/sh
error() { echo "$@" 1>&2; }
domain_files=$1
if [ -z $domain_files ]; then
error "What is the file with the domains?"
exit 1
fi