Skip to content

Instantly share code, notes, and snippets.

View Harkishen-Singh's full-sized avatar
🔬
Engineering @timescale's data ingest tools

Harkishen Singh Harkishen-Singh

🔬
Engineering @timescale's data ingest tools
View GitHub Profile
@Harkishen-Singh
Harkishen-Singh / prometheus_tsdb_index_layout_gist.md
Created December 16, 2021 11:27
This Gist explains Prometheus's tsdb index layout along with some implementation details at various steps.
STEP 1: When AddSymbol() is called
----------------------------------------
alenblen;label_name_1;label_value_1;label_name_2;label_name_3;label_value_2;label_value_3;

remarks: "alenblen" is the space reserved for symbol table metadata, like size of the symbol table, and number of symbols.
This is overwritten in the finishSymbol().

STEP 2: When finishSymbol() is called
----------------------------------------
sudo apt update
sudo apt-get install gcc -y
wget -c https://dl.google.com/go/go1.17.4.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile
go version
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
@Harkishen-Singh
Harkishen-Singh / Davinci fixes.md
Created July 24, 2021 11:55
Quick Davinci Resolve fixes. When I created this gist, I was using DR 17 version. Please comment if you have better ideas.

If you get The Fusion composition on the current frame or clip could not be processed successfully, then a woking fix for me is

Go to Preference<User<Ui and uncheck the "Stop renders when a frame or clip cannot be processed".

After doing this DR was able to render the project. Also all effects etc. were visible and no frame was dropped. Nontheless if somebody knows it better or why this is a bad Idea, please feel free to lecture me.
@Harkishen-Singh
Harkishen-Singh / cgroups_docker_error_fix.md
Created July 22, 2021 07:45
Fix cgroups error in docker

In order to fix cgroups error in running docker, try these commands and restart your system. One of them should work.

sudo update-grub "systemd.unified_cgroup_hierarchy=0"

sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"

Download skillshare course playlist without signup

This gist tells you how to download a skillshare course playlist without any signup.

Go to https://colab.research.google.com/github/calvinhobbes23/Skillshare-DL/blob/master/Skillshare_DL_[KENWAY].ipynb#scrollTo=W4DvOJaqsGaj

Signin with a gmail ccount (I recommend a fake gmail account)

Make sure that there is enough space in your Google Drive since this script downloads and transfers the videos to the Google Drive of the account provided.

Integrating Gitter with Github using Webhooks manually

This gist discusses about integrating gitter community with Github webhooks so that updates in github can be shwon under activity place in gitter comunity room.

To do this, follow the steps:

  1. Click on settings
  2. Go to integrations
  3. Click on Github
  4. You will get a token there. Copy that and call it, say TOKEN.

this is a content