Skip to content

Instantly share code, notes, and snippets.

View vgaicuks's full-sized avatar

Vitālijs Gaičuks vgaicuks

  • Trialine
  • Riga, Latvia
View GitHub Profile
# You may get error like "curl: (60) SSL certificate problem: certificate has expired"
# One of root certif like "AddTrust External CA Root" expires after May 30, 2020
# this may cause the issue
1. Dowloand correct "USERTrust RSA Certification Authority" root certificate from official site: https://support.sectigo.com/Com_KnowledgeDetailPage?Id=kA01N000000rfBO
2. copy SHA-2_Root_USERTrust_RSA_Certification_Authority.crt to /usr/share/ca-certificates/mozilla
3. run sudo dpkg-reconfigure ca-certificates
4. uncheck mozilla/AddTrust_External_Root.crt and check mozilla/2_Root_USERTrust_RSA_Certification_Authority.crt
5. press OK
6. run sudo update-ca-certificates
@vgaicuks
vgaicuks / project.sh
Created March 19, 2019 16:08
Project autocomplete
#!/bin/bash
_projects()
{
local curw
COMPREPLY=()
curw=${COMP_WORDS[COMP_CWORD]}
local projects=$(ls -1 ~/code)
COMPREPLY=($(compgen -W "$projects" -- $curw));
return 0
@vgaicuks
vgaicuks / Install RTL8811CU Wireless dongle on debian based RPI3
Last active April 12, 2020 16:42
RPI3 does not support RTL8811CU Wireless LAN 802.11ac USB NIC dongle out of the box. Guideline to compile by yourself
# Device 0bda:c811, RTL8811CU Wireless LAN 802.11ac USB NIC
# Drivers for rtl8811CU and rtl8821CU Wi-Fi chipsets.
$ lsusb
# List of supported devices by compiled modules
$ modprobe -c | grep -i 8821cu # search our module
# Thread on forum with this problem (whitebatman saved my day)
1. https://ubuntuforums.org/showthread.php?t=2389602&page=3&p=13772230#post13772230
2. Whitebatman Repo: https://github.com/whitebatman2/rtl8821CU
0xb2690c748F5Ee4d5d43EE4116315EFB854a31b70
#!/usr/bin/python
# Create domains.txt file with domains list WITHOUT .lv seperated by newlines
# example:
# trialine
# google
import requests
f = open('domains.txt')
@vgaicuks
vgaicuks / youtube-to-mp3.sh
Last active June 9, 2018 19:30
youtube-dl
#! /bin/bash
# args: youtube playlist url
#youtube-dl --extract-audio --audio-format mp3 --yes-playlist "$1"
youtube-dl -x --audio-format mp3 -o "%(title)s.%(ext)s" --yes-playlist "$1"