Skip to content

Instantly share code, notes, and snippets.

View mikekenneth's full-sized avatar
🌍

Mike Houngbadji mikekenneth

🌍
View GitHub Profile
@h2ouw8n4
h2ouw8n4 / install libappindicator3-1.sh
Last active December 31, 2021 08:36
Install libappindicator3-1 when missing on Debian Bullseye
wget http://ftp.us.debian.org/debian/pool/main/libi/libindicator/libindicator3-7_0.5.0-4_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-7_amd64.deb
sudo apt install ./libindicator3-7_0.5.0-4_amd64.deb
sudo apt install ./libappindicator3-1_0.4.92-7_amd64.deb
@mikekenneth
mikekenneth / fix-wsl2-dns-resolution
Created April 6, 2021 13:08 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@mikekenneth
mikekenneth / .gitignore
Created July 1, 2020 08:26 — forked from santoshpy/.gitignore
gitignore file for django project
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
@mikekenneth
mikekenneth / Install Python 3.7.5 on CentOS 7
Last active May 7, 2022 02:41 — forked from wpupru/Install Python 3.7.0 on CentOS 7
Install Python 3.7.5 on Centos 7
Install Python 3.7.5 on CentOS/RHEL 7
1.Requirements:
yum install gcc openssl-devel bzip2-devel libffi-devel
# Below requirement for djang projects
yum install readline-devel tk-devel tk-devel openssl-devel sqlite-devel openssl tk readline sqlite
2.Download Python 3.7:
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 26, 2024 06:32
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@wpupru
wpupru / Install Python 3.7.0 on CentOS 7
Last active February 21, 2024 15:06
Install Python 3.7.0 on Centos 7
Install Python 3.7.0 on CentOS/RHEL 7
1.Requirements:
yum install gcc openssl-devel bzip2-devel
2.Download Python 3.7:
cd /usr/src
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
@efernandesng
efernandesng / reset_teamviewer.sh
Last active January 9, 2024 19:38
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#!/bin/bash
##
# Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#
# Tested on Arch linux
##
CONFIG_FILE=/opt/teamviewer/config/global.conf
@sirodoht
sirodoht / migrate-django.md
Last active April 20, 2024 09:52
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 23, 2024 02:03
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@duffn
duffn / creating_a_date_dimension_table_in_postgresql.sql
Last active February 22, 2024 19:14
Creating a date dimension table in PostgreSQL
DROP TABLE if exists d_date;
CREATE TABLE d_date
(
date_dim_id INT NOT NULL,
date_actual DATE NOT NULL,
epoch BIGINT NOT NULL,
day_suffix VARCHAR(4) NOT NULL,
day_name VARCHAR(9) NOT NULL,
day_of_week INT NOT NULL,