Skip to content

Instantly share code, notes, and snippets.

View ticklemynausea's full-sized avatar
🔥
this is fine

Mário Carneiro ticklemynausea

🔥
this is fine
View GitHub Profile
@ticklemynausea
ticklemynausea / Tests in production 🐇.md
Last active March 1, 2024 18:40
Tests in production 🐇.md
gists
id url createdAt updatedAt filename isPublic
7268afbe5c0b35667420e41ff8ecb3ca
2024-03-01T18:05:19Z
2024-03-01T18:35:58Z
Tests in production 🐇.md
true

Now that we've merged dandelion#24244 we set to test its performance in production. We isolate a set of channels with different magnitudes of amount of feedback records, and test its performance with this ruby snippet:

@ticklemynausea
ticklemynausea / using nginx-proxy and acme-companion.md
Created January 9, 2024 16:07
using nginx-proxy and acme-companion.md

using nginx-proxy and acme-companion to have nice https urls for your services

nginx-proxy

nginx-proxy will act as a reverse proxy and accept incoming http connections and forward them to the correct nginx containers.

docker network

the containers use a separate docker network

if your containers need to use another docker network, or even the host network (quite common) see the section about it below

#!/bin/bash
# Makes the portuguese windows keyboard layout work in osx -
# whatever the key is labeled will be matched to the keystroke, with a caveat:
#
# Windows and apple keyboards have an exclusive key to each - "french quotation marks" key («»)
# is exclusive to windows layouts and the "paragraph / plus minus" key (§±) is exclusive to apple
# layouts. This configuration will make the exclusive windows key behave as apple's.
#
# The configuration is not scoped to a particular keyboard, so to restore the default behavior of
#!/usr/bin/env python
import sys
import pync
def write_stdout(s):
# only eventlistener protocol messages may be sent to stdout
sys.stdout.write(s)
sys.stdout.flush()
#!/bin/bash
for port in $@
do
for pid in $(lsof -iTCP:$port | awk '{print $2}' | tail -n +2)
do
echo $port: $pid
kill -9 $pid
done
done
total 36332
drwxrwxr-x 2 minecraft minecraft 4096 Jan 1 2016 AdBolt
-rw-rw-r-- 1 minecraft minecraft 69436 Oct 4 2015 AdBolt-1.0.jar.disabled
drwxrwxr-x 2 minecraft minecraft 4096 Jun 11 2015 AnimalProtect
-rw-rw-r-- 1 minecraft minecraft 36450 Dec 13 2014 AnimalProtect.jar
drwxrwxr-x 2 minecraft minecraft 4096 Aug 6 16:30 AntiJoinBot
-rw-rw-r-- 1 minecraft minecraft 28235 Feb 28 2015 AntiJoinBot.jar
drwxrwxr-x 2 minecraft minecraft 4096 Jan 14 2016 AsyncWorldEdit
-rw-r--r-- 1 minecraft minecraft 64816 Jan 18 2016 AsyncWorldEditInjector.jar
-rw-r--r-- 1 minecraft minecraft 301820 Jan 18 2016 AsyncWorldEdit.jar
@ticklemynausea
ticklemynausea / -
Last active September 4, 2017 15:31
This file has been truncated, but you can view the full file.
{
"categories": {
"1": {
"name": "The reference point (including, as appropriate, a base year)",
"slug": "the_reference_point_including_as_appropriate_a_base_year"
},
"2": {
"name": "Time frames and/or periods for implementation",
"slug": "time_frames_andor_periods_for_implementation"
},
+---------+
+------------+1 |locations| 1+----------+
+ +---------+ +
* *
+--------+ +--------------------------------------+ +-----------------------------+ +---------------------------+
|charts | |indicators | |indicator_data | |data |
+--------+ 1+--+* +--------------------------------------+ +-----------------------------+ +---------------------------+
|id (pk) | |id (pk) | |location_id (fk: locations) | |location_id (fk: locat
const csv = require("csv");
const process = require("process");
const fs = require("fs");
const _ = require("lodash");
const files = {
source: "Explorer-NDC-Data.csv",
meta: "Explorer-Nav-And-Legend-Data.csv",
};
<html>
<head>
<style>
.row {
display: flex
}
.cell {
width: 200px;
height: 200px;
background-color: white;