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:
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 /
Created March 19, 2019 16:08
Project autocomplete
local curw
local projects=$(ls -1 ~/code)
COMPREPLY=($(compgen -W "$projects" -- $curw));
return 0
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)
2. Whitebatman Repo:
# Create domains.txt file with domains list WITHOUT .lv seperated by newlines
# example:
# trialine
# google
import requests
f = open('domains.txt')
vgaicuks /
Last active June 9, 2018 19:30
#! /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"