Skip to content

Instantly share code, notes, and snippets.

View dougg0k's full-sized avatar

Douglas Galdino dougg0k

  • Brazil
  • 21:33 (UTC -03:00)
View GitHub Profile
@dougg0k
dougg0k / netlify_cloudflare_cdn
Last active April 5, 2020 15:08
A way to use Cloudflare CDN with Netlify
1- Create Github account.
2- Create your private repo and push your files.
3- Login into Netlify with Github and add your repo there.
4- Given that you have your netlify.toml in your project already configured. Keep Post Process disabled.
5- Add your domain to Netlify, but do not configure the DNS nor Alias.
6- Create a Cloudflare account.
7- Add your domain there and configure the DNS to theirs where you bought your domain.
8- Configure the DNS adding CNAME @ with generated Netlify URL from your project in target and CNAME www with @ in target. Both with orange cloud activated (proxified).
9- SSL > Full.
10- Speed > Optimization, Activate Brotli and Rocket Loader and Minify all 3 options.
const getCountryFlagEmoji = countryCode => String.fromCodePoint(...[...countryCode.toUpperCase()].map(x => 0x1f1a5+x.charCodeAt(0)))
getFlagEmoji('GB') // 🇬🇧
getFlagEmoji('JP') // 🇯🇵
getFlagEmoji('ZA') // 🇿🇦
@dougg0k
dougg0k / http_request_proxy_list.ts
Last active August 21, 2021 23:56
Bypass Rate Limiter by IP by making requests through a proxy list.
import got from "got";
import tunnel from "tunnel";
const PROXY_LIST = [
{ ip: "", port: 80 },
{ ip: "", port: 80 },
{ ip: "", port: 80 },
{ ip: "", port: 80 },
];
const puppeteer = require("puppeteer");
const Xvfb = require("xvfb");
async function getOpenseaData({ operationName, query, variables }) {
const xvfb = new Xvfb({
silent: true,
xvfb_args: ["-screen", "0", "1280x720x24", "-ac"],
});
xvfb.start((err) => {
if (err) {
@dougg0k
dougg0k / index.js
Created September 24, 2021 16:27
Get data from Cloudflare WAF protected url. In this case, was for GraphQL.
const puppeteer = require("puppeteer");
const Xvfb = require("xvfb");
async function getDataFromProtectedUrl({ url, operationName, query, variables }) {
const xvfb = new Xvfb({
silent: true,
xvfb_args: ["-screen", "0", "1280x720x24", "-ac"],
});
xvfb.start((err) => {
if (err) console.error(err);
CREATE MATERIALIZED VIEW IF NOT EXISTS latest_prices
AS
SELECT DISTINCT ON (summary_tokens_sold) summary_tokens_sold, price
FROM sgd6.open_sea_sale t1
WHERE block_timestamp = (
SELECT MAX(block_timestamp)
FROM sgd6.open_sea_sale
WHERE summary_tokens_sold = t1.summary_tokens_sold
AND price > 0
)
import { GraphQLClient, RequestDocument, Variables } from "graphql-request";
export function delay(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
export async function gqlRequest({
url,
document,
variables,

In the screen with the Install button, do not press it.

  • Press Shift+F10 to open cmd
  • Type the following commands
REG ADD "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f
REG ADD "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f
REG ADD "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f
REG ADD "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f
REG ADD "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f
@dougg0k
dougg0k / edgerouter_doh.md
Last active March 19, 2026 20:13
Edgerouter / EdgeOS / DoH / Security Settings / NextDNS / Cloudflare

Edgerouter / EdgeOS / DoH / Security Settings

Notes

  • It seems that every firmware update, whatever was done to get nextdns into the router, will be gone, so you will have to redo the steps or at least some, if you confirm that it has happened.
    • However there is locations where the config might be persisted on router reset.
    • /config/scripts/post-config.d/ or /config/user-data/
  • I recommend not configuring the router through the UI, after reset, but by SSH after enablig it. That can prevent bad configuration, re-requiring the router reset.
  • Make sure to have NTP enabled and configured. To avoid bugs.
  • You can do through the UI CLI or using SSH, if you have enabled it and set a port.
@dougg0k
dougg0k / code-flags.conf
Last active March 25, 2026 17:11
VSCode flags - ~/.config/code-flags.conf
# They may appear as warning if opening vscode through terminal, but they work.
# Never use more than one --enable-features and --disable-features as it can overwrite the previous.
# This was built using Arch Linux (Wayland) if some flags / features are not compatible with other OS, up to whoever uses, to remove them.
# There are two threads that if ever get implemented into vscode, could bring improvements to the usage experience.
# https://github.com/microsoft/vscode/issues/27378
# https://github.com/microsoft/vscode/issues/221145
# CPU