Skip to content

Instantly share code, notes, and snippets.

View xgenvn's full-sized avatar

TuNA xgenvn

View GitHub Profile
@xgenvn
xgenvn / kde-latte-dock-win-key.md
Last active August 4, 2020 11:58
KDE latte Win key
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
xgenvn / 99-noto-mono-color-emoji.conf
Created July 29, 2020 04:02 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?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.
Usage:
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
@xgenvn
xgenvn / Dockerfile
Created July 22, 2020 11:42
Portainer ECR
FROM golang:1.9 as ecr-helper
RUN go get -u github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login
WORKDIR /go/src/github.com/awslabs/amazon-ecr-credential-helper
RUN make
FROM busybox as busybox
RUN which busybox
FROM portainer/portainer:latest
ENV HOME=/
@xgenvn
xgenvn / proxy.js
Created July 21, 2020 07:53
NUXT proxy
const httpProxy = require('http-proxy')
const proxy = httpProxy.createProxyServer()
const API_URL = process.env.API_URL || 'https://api.mydomain.com'
export default function(req, res, next) {
proxy.web(req, res, {
target: API_URL
})
}
@xgenvn
xgenvn / dgraph.yml
Created July 20, 2020 03:58
dgraph docker-compose example
version: "3.2"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- ./.data/dgraph:/dgraph
ports:
- 5080:5080
@xgenvn
xgenvn / capslock.json
Created July 17, 2020 02:07
Karabiner - Dev Mode
{
"title": "Use CAPS LOCK for vi navigation",
"rules": [
{
"description": "CAPS LOCK + awsd to arrow keys; CAPS+c to ESC; CAPS+2 to SHIFT+FN+F6",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "c",
@xgenvn
xgenvn / .Xmodmap
Last active July 16, 2020 18:02
Go lang keyboard layout
clear Lock
keycode 66 = Mode_switch
keysym a = a A Left
keysym d = d D Right
keysym w = w W Up
keysym s = s S Down
keysym q = q Q Home
keysym e = e E End
@xgenvn
xgenvn / Guide.md
Last active April 5, 2020 16:02
Fix fan control 0 z370-i asus

Add acpi_enforce_resources=lax to grub command line option

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_enforce_resources=lax"
GRUB_CMDLINE_LINUX=""
@xgenvn
xgenvn / Guide.md
Created April 5, 2020 10:45
WPS Spreadsheet with motif

Edit desktop file: /usr/share/applications/wps-office-et.desktop

Exec=sh -c 'GTK_DATA_PREFIX=/usr/share/themes/Yaru/gtk-3.0/gtk.css et "%f"'