Skip to content

Instantly share code, notes, and snippets.

View wdv4758h's full-sized avatar

Chiu-Hsiang Hsu wdv4758h

View GitHub Profile
2013.06.05 23:01
$ history | awk '{CMD[$2]++;count++;} END { for (a in CMD )print CMD[ a ]" " CMD[ a ]/count*100 "% " a}' | grep -v "./" | column -c 3 -s " " -t | sort -nr | nl | head -n 10
1 631 20.5671% make
2 424 13.8201% fg
3 378 12.3207% vim
4 219 7.1382% ls
5 148 4.82399% cd
6 125 4.07432% ydict
7 84 2.73794% dig
8 79 2.57497% cat
@wdv4758h
wdv4758h / .bashrc
Created December 22, 2013 09:07
convert to pdf in command line (put it in .bashrc)
cpdf () {
libreoffice --headless --convert-to pdf "$1"
}
@wdv4758h
wdv4758h / rc.lua
Created March 4, 2014 16:11
my rc.lua now
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
@wdv4758h
wdv4758h / virtualenv.md
Last active August 29, 2015 14:00
Virtualenv
@wdv4758h
wdv4758h / math.md
Last active August 29, 2015 14:01
Math

數學 QQ

就是紀錄些自己看到的數學相關的問題

等之後有時間再來更了解一點或者天上掉下來一位數學大大幫我解說

數學相關網站

@wdv4758h
wdv4758h / timezone.md
Created May 22, 2014 06:15
MySQL/MariaDB - Timezone

Timezone 轉換

使用 text values

先用以下這行指令建立 Table (會建立 timezone 相關資訊在 mysql 這個 database 底下的 table)

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u USER_NAME mysql

@wdv4758h
wdv4758h / vmware.md
Created May 24, 2014 04:39
about VMware

目前官方沒有 Linux 上的 vSphere Client

但是用 VMware Player (有 Linux Version) 可以做到 開啟虛擬機、遠端進虛擬機

用這個指令 :

​vmplayer -h

接著會跳出視窗問 Host Name、User、Password, 接著會列出 Server 上的虛擬機,