Skip to content

Instantly share code, notes, and snippets.

View clouedoc's full-sized avatar
🦀
Learning Rust for fun&profit

Camille Louédoc-Eyriès clouedoc

🦀
Learning Rust for fun&profit
View GitHub Profile
@clouedoc
clouedoc / timescaledb_error.md
Created October 15, 2022 15:19
Pq: function time_bucket(unknown, timestamp without time zone) does not exist

Weird TimescaleDB permission error

Hello there,

I've encountered this error while trying to add a TimescaleDB (Postgres) datasource to Postgres:

Pq: function time_bucket(unknown, timestamp without time zone) does not exist

There is no solution online, so I've decided to post mine here. I hope that it finds you well

@clouedoc
clouedoc / proxyrack-countries.json
Created October 9, 2022 20:46
List of countries that ProxyRack can serve as of 9 oct. 2022
[
"CV",
"ID",
"BA",
"CR",
"CD",
"BF",
"NP",
"SE",
"PT",
@clouedoc
clouedoc / Dockerfile.squid
Created June 4, 2022 11:57
Dockerfile for squid with SSL interception and caching
FROM salrashid123/squidproxy
ENTRYPOINT [ "/apps/squid/sbin/squid" ]
CMD [ "-NsY", "-f", "/apps/squid.conf.intercept"]
# test your proxy with this command:
# curl --insecure --proxy http://<Your Proxy Host Here>:3128 https://www.lagado.com/tools/cache-test | grep "page serial number</b></td"
# the number should be the same everytime
@clouedoc
clouedoc / block-assets-plugin.ts
Last active June 2, 2022 17:43
This puppeteer-extra plugin blocks requests based on patterns. It includes supports for service workers.
import { CDPSession, Page, Target, WebWorker } from 'puppeteer';
import { PuppeteerExtraPlugin } from 'puppeteer-extra-plugin';
const blockedResources: string[] = [
// Assets
'*/favicon.ico',
'.css',
'.jpg',
'.jpeg',
'.png',
@clouedoc
clouedoc / .eslintrc.js
Created March 21, 2022 16:48
My .eslintrc
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');
var isDev = process.env.NODE_ENV === "development";
module.exports = {
root: true,
extends: [
"@rushstack/eslint-config/profile/node",
"@rushstack/eslint-config/mixins/friendly-locals",
@clouedoc
clouedoc / akamai_canvases.md
Last active March 7, 2022 18:22
Akamai uses two canvases. Here's my interpretation of it.

Did anyone else notice that Akamai generated two canvases? One of them is large, and the other is pretty small.

The big canvas they use looks like this: https://arh.antoinevastel.com/assets/media/sneakers/anon_canvas1_footlocker.png. The small (16x16) canvas they use looks like this: https://arh.antoinevastel.com/assets/media/sneakers/anon_canvas2_footlocker.png.

My intuition is that the checksum of the small canvas will be the same on every GPU and OS. They use the first canvas for fingerprinting and the second one to check that the user did not apply noise to their canvases. (anti-canvas-fingerprinting extension will indiscriminately apply noise to all canvases)

This intuition coincides with a 2014 research paper I recently skimmed through where you can read:

@clouedoc
clouedoc / regex.re
Created January 3, 2022 15:12
Regexp to get the first line of text
(?m)(?:(.+?)\n(?:(?:.+?)?\n)+.+?$)|(.+?$)
# Replace with "$1$2"
@clouedoc
clouedoc / crunchbase_unblur.js
Created December 26, 2021 15:05
Crunchbase unblur
document.querySelectorAll('.blurred-row').forEach(row => row.setAttribute('class', 'ng-star-inserted'))
@clouedoc
clouedoc / mark all github files as viewed.md
Created December 10, 2021 18:34
Mark all github files as viewed

Mark all github files as viewed

Add this to your bookmarks:

javascript:(() => document.querySelectorAll('.js-reviewed-checkbox:not([checked])').forEach(box => box.click()))()

Then click the created bookmark to execute it!

@clouedoc
clouedoc / Chrome-SIGILL.md
Created November 26, 2021 18:44
If you get SIGILL with a Dockerized Chrome instance, here is the solution.

Chrome SIGILL

Add these arguments:

  '--no-sandbox',
  '--enable-logging',
  '--v1=1',
  '--disable-dev-shm-usage',
 '--no-first-run',