Skip to content

Instantly share code, notes, and snippets.

$ sudo pacman -S fcitx fcitx-chewing kcm-fcitx
#fcitx
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
@markwu
markwu / rnb.erb
Created March 12, 2019 17:18 — forked from romainl/_rnb.md
RNB, a Vim colorscheme template
<%
# RNB, A VIM COLORSCHEME TEMPLATE
# Author: Romain Lafourcade (https://github.com/romainl)
# Canonical URL: https://gist.github.com/romainl/5cd2f4ec222805f49eca
# This template is designed to help vimmers create their own colorschemes
# without much effort.
#
# You will need Ruby to generate your colorscheme but Ruby knowledge is
# not needed at all.
@markwu
markwu / cfilter.vim
Created February 2, 2019 03:53 — forked from PeterRincker/cfilter.vim
Filter the quickfix list
" :Cfilter[!] /{pat}/
" :Cfilter[!] {pat}
" Filter the quickfix looking for pattern, `{pat}`. The pattern can match the filename or text.
" Providing `!` will invert the match (just like `grep -v`).
" Note: :cfilter command abbreviation is provided for convenience
"
" :Lfilter[!] /{pat}/
" :Lfilter[!] {pat}
" Same as :Cfilter but use the location list.
" Note: :lfilter command abbreviation is provided for convenience
@markwu
markwu / cfilter.vim
Created February 2, 2019 03:52 — forked from PeterRincker/cfilter.vim
Filter the quickfix list
" :Cfilter[!] /{pat}/
" :Cfilter[!] {pat}
" Filter the quickfix looking for pattern, `{pat}`. The pattern can match the filename or text.
" Providing `!` will invert the match (just like `grep -v`).
" Note: :cfilter command abbreviation is provided for convenience
"
" :Lfilter[!] /{pat}/
" :Lfilter[!] {pat}
" Same as :Cfilter but use the location list.
" Note: :lfilter command abbreviation is provided for convenience
/etc/X11/xinit/xinput.d/fcitx.conf
```
export XIM_PROGRAM=fcitx
export XIM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
```
@markwu
markwu / uninstall_vmware.sh
Created November 8, 2018 15:56
Completely uninstall VMWare on macOS
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing $entry ["
sudo rm -rf "$entry"
if [[ ! -e "$entry" ]]; then
echo -ne "OK"
@markwu
markwu / ensure-cert-macos.sh
Created December 12, 2017 07:53 — forked from koop/ensure-cert-macos.sh
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@markwu
markwu / dnsmasq OS X.md
Created December 10, 2017 10:17 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install

@markwu
markwu / Mysqltop
Created March 21, 2017 07:06 — forked from cpliakas/Mysqltop
Mysql top
#!/bin/bash
watch -n 5 --differences mysqladmin processlist