Skip to content

Instantly share code, notes, and snippets.

@paulogdm
paulogdm / README.md
Last active September 12, 2022 22:23
Enabling HiDPI Display on Macbook Pro M1

Introduction

All original credit goes to @GetVladimir.

(WORK IN PROGRESS)

  1. Are you using any kind of VPN, HTTP Proxy, Corporate Proxy, Corporate Firewall, etc?
  2. Where are you based of, geographically?
  3. What’s your current IP address? Share a screenshot of https://whatismyip.host/
  4. Run sudo mtr -Twrc 10 vercel.com and share the full output. You can get mtr by running brew install mtr on macOS and sudo apt-get install mtr on Ubuntu. We don't have an alternative for Windows at the moment.
  5. Run sudo mtr -Twrc 10 secondary-1.vercel-infra.com and share the full output.
@paulogdm
paulogdm / gist:fe88f4169ed4a084bc353949385039c8
Last active August 3, 2020 17:07 — forked from huggler/gist:0f3bbab3a77c34a9811b3592f8765386
Now.json da odete.com.br hospedada na vercel
{
"version": 2,
"rewrites": [
{
"source": "/service-worker.js",
"destination": "static/service-worker.js"
},
{"source": "/favicon.ico", "destination": "assets/icons/favicon.ico"}
],
"headers": [
now dns add odete.com.br '@' TXT google-site-verification=codehere
now dns add odete.com.br '@' MX ASPMX.L.GOOGLE.COM 1
now dns add odete.com.br '@' MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add odete.com.br '@' MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add odete.com.br '@' MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add odete.com.br '@' MX ALT4.ASPMX.L.GOOGLE.COM 10
now dns add odete.com.br auth CNAME odete-249213.firebaseapp.com
now dns add odete.com.br 14810097 CNAME sendgrid.net
now dns add odete.com.br s1._domainkey CNAME s1.domainkey.u14810097.wl098.sendgrid.net
@paulogdm
paulogdm / script.sh
Last active April 16, 2022 06:37
Useful `dig` and `curl` commands
# Query any record
dig A paulogdm.com
dig NS paulogdm.com
dig CNAME www.paulogdm.com
# Query any record using a specific DNS resolver
dig A paulogdm.com @1.1.1.1
dig A paulogdm.com @8.8.8.8
# Query record with a trace of the DNS resolution
// a.js
module.exports = async (req, res) => {
await middleware(req, res)
}
// b.js
module.exports middleware( async (req, res) => {
// ...
})
@paulogdm
paulogdm / dig for MX
Created October 17, 2019 17:48
bitauth.com dig
dig bitauth.com MX &&\
dig bitauth.com MX @1.1.1.1 &&\
dig bitatuh.com MX @8.8.8.8 &&\
nslookup -q=MX bitauth.com &&\
echo "end of set"
{
"version": 2,
"alias": ["shortcutly.com"],
"routes": [
{
"src": "/(.*)",
"status": 301,
"headers": { "Location": "www.shortcutly.com/$1 " }
}
]
{
"version": 2,
"name": "nextjs",
"builds": [{
"src": "package.json",
"use": "@now/static-build",
"config": { "newPipeline": true }
}]
}
// taken from https://spectrum.chat/thread/3d15e59b-a893-494a-b8a8-a8cc391094d6
const {send} = require('micro')
const axios = require('axios')
const fs = require('fs')
const sharp = require('sharp')
const memoize = require('memoizee')