Skip to content

Instantly share code, notes, and snippets.

View Sanix-Darker's full-sized avatar
🐼
coding in the dark...

darker Sanix-Darker

🐼
coding in the dark...
View GitHub Profile
@Sanix-Darker
Sanix-Darker / mno.json
Created June 12, 2024 10:02 — forked from Jspascal/mno.json
Africa Mobile Phone Number regex
{
"om_cmr": "/^6(5[5-9]|9|8[5-9])/",
"momo_cmr": "/^6(5[1-4]|7|8[1-4])/",
"momo_civ": "/^(05)/",
"om_civ": "/^(07)/",
"moov_civ": "/^(01)/",
"wave_civ": "/^(0[157])/",
"moov_ben": "/^(9[4589]|6[03458]|5[58])/",
"moov_tgo": "/^(9[6-9]|79)/",
"tmoney": "/^(70|9[0-3])/",
@Sanix-Darker
Sanix-Darker / answerfile
Created October 29, 2023 21:32 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@Sanix-Darker
Sanix-Darker / postgres-cheatsheet.md
Created August 12, 2023 09:46 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)

Editing remote files in Vim with SSH

  1. Configure SSH

    In ~/.ssh/config, include the lines:

    Host *
    ControlPath ~/.ssh/sockets/%r@%h-%p
    
@Sanix-Darker
Sanix-Darker / transparent.vim
Created February 5, 2022 00:32 — forked from fuadnafiz98/transparent.vim
vim transparent background
" for transparent background
function! AdaptColorscheme()
highlight clear CursorLine
highlight Normal ctermbg=none
highlight LineNr ctermbg=none
highlight Folded ctermbg=none
highlight NonText ctermbg=none
highlight SpecialKey ctermbg=none
highlight VertSplit ctermbg=none
highlight SignColumn ctermbg=none
@Sanix-Darker
Sanix-Darker / currencies_country_flags.json
Created February 2, 2022 15:00 — forked from demirdev/currencies_country_flags.json
Currency list with Country Flag
[
{
"name": "US Dollar",
"symbol": "$",
"symbolNative": "$",
"decimalDigits": 2,
"rounding": 0,
"code": "USD",
"namePlural": "US dollars",
"countryEmoji": "🇺🇸"
@Sanix-Darker
Sanix-Darker / 2019-https-localhost.md
Created March 1, 2020 21:42 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@Sanix-Darker
Sanix-Darker / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Created January 22, 2020 14:32 — forked from mrothNET/LetsEncrypt+certbot+UFW+postfix+dovecot.md
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
@Sanix-Darker
Sanix-Darker / path.md
Created January 5, 2020 20:21 — forked from nex3/path.md

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@Sanix-Darker
Sanix-Darker / install_opencv2_ubuntu.sh
Created December 23, 2019 14:20 — forked from arthurbeggs/install_opencv2_ubuntu.sh
Install OpenCV2 in Ubuntu
#!/bin/bash
################################################################################
### OpenCV2 Installation Script ###
################################################################################
# Source code at https://github.com/arthurbeggs/scripts #
################################################################################
# #
# Feel free to copy and modify this file. Giving me credit for it is your #
# choice, but please keep references to other people's work, which I don't #