Skip to content

Instantly share code, notes, and snippets.

@ahn84
ahn84 / glxinfo-error.md
Created July 26, 2025 14:59
error with opengl glxinfo after removing amdgpu

I've encountered some errors after removing amdgpu driver in a ryzen 7 laptop. VLC panic saying opengl can't be found.

$ glxinfo
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig

Checking /var/log/Xorg.0.log there's something

package main
import (
"crypto/ecdsa"
"crypto/ed25519"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
@ahn84
ahn84 / postgres-cheatsheet.md
Created September 26, 2022 09:58 — 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)
package vn.bdaj.vnlang;
import java.text.Collator;
import java.text.Normalizer;
import java.text.ParseException;
import java.text.RuleBasedCollator;
import java.util.regex.Pattern;
public class LangUtil {
public static String removeAccent(String str) {
@ahn84
ahn84 / CMakeLists.txt
Created March 28, 2018 09:25
Sample CMakeLists.txt for QT applications
cmake_minimum_required(VERSION 3.1)
project(MyApp LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
# Instruct CMake to run tools automatically when needed
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)