Skip to content

Instantly share code, notes, and snippets.


Anh Tu Nguyen xgenvn

View GitHub Profile
xgenvn /
Created Oct 15, 2020
Setup libsecret git gnome git credential
sudo apt-get install libsecret-1-0 libsecret-1-dev libglib2.0-dev
sudo make --directory=/usr/share/doc/git/contrib/credential/libsecret
git config --global credential.helper \
xgenvn / blackd.service
Created Sep 30, 2020
BlackD Formatter as service
View blackd.service
# /etc/systemd/system/blackd.service
# sudo systemctl start blackd
# sudo systemctl enable blackd
# sudo systemctl status blackd
Description=Black Formatter Service
xgenvn / Fix sleep awake issues ubuntu
Created Sep 7, 2020
Fix sleep awake issues ubuntu 20.04
View Fix sleep awake issues ubuntu
  • Symstom: NVIDIA 440.100, GPU 1060, Ubuntu 20.04
  • Solution: Edit /etc/default/grub
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX="nouveau.modeset=0 acpi_osi=! acpi_osi=\"Windows 2015\" acpi_backlight=vendor mem_sleep_default=deep acpiphp.   disable=1" GRUB_CMDLINE_LINUX="nouveau.blacklist=1 acpi_rev_override=1 acpi_osi=Linux nouveau.modeset=0 pcie_aspm=force drm.vblankoffdelay=1   scsi_mod.use_blk_mq=1 nouveau.runpm=0 mem_sleep_default=deep"
xgenvn / Makefile
Created Aug 12, 2020 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta "org.kde.lattedock,/Latte,org.kde.LatteDock,activateLauncherMenu"
qdbus org.kde.KWin /KWin reconfigure

Binding to Expose All or Present Windows

xgenvn / 99-noto-mono-color-emoji.conf
Created Jul 29, 2020 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
View 99-noto-mono-color-emoji.conf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
  1. Run on a terminal
 ssh -D 1337 -q -C -N <user>@ip -v
  1. Firefox:
  • Install FoxyProxy
  • Enter new configuration:
    • type: socks5
    • host: localhost
View Dockerfile
FROM golang:1.9 as ecr-helper
RUN go get -u
WORKDIR /go/src/
RUN make
FROM busybox as busybox
RUN which busybox
FROM portainer/portainer:latest
View proxy.js
const httpProxy = require('http-proxy')
const proxy = httpProxy.createProxyServer()
const API_URL = process.env.API_URL || ''
export default function(req, res, next) {
proxy.web(req, res, {
target: API_URL
xgenvn / dgraph.yml
Created Jul 20, 2020
dgraph docker-compose example
View dgraph.yml
version: "3.2"
image: dgraph/dgraph:latest
- ./.data/dgraph:/dgraph
- 5080:5080
You can’t perform that action at this time.