Skip to content

Instantly share code, notes, and snippets.

View chyuaner's full-sized avatar

元兒~ chyuaner

View GitHub Profile
@chyuaner
chyuaner / 5-4 DB實習.sql
Last active April 10, 2019 16:05
中華大學 104 5/4資料庫系統實習範例
-- 建立資料庫
CREATE DATABASE Sample;
-- 接下來都對這個資料庫操作
USE Sample;
-- 建立表格
CREATE TABLE Student (
S# int NOT NULL PRIMARY KEY,
SName varchar(50) NULL,
# 參考資料:
# - http://archan.wordpress.com/2010/10/12/getting-adb-working-with-archlinuxsamsung-i5700cyanogen-cm6-froyo/
# - http://forum.xda-developers.com/showthread.php?t=1642230
sudo echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", GROUP=\"plugdev\"" > /etc/udev/rules.d/70-android.rules
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
sudo echo "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0cec\", MODE=\"0666\"\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0cec\"\nTEST==\"/var/run/ConsoleKit/database\", \\nRUN+=\"udev-acl --action=$env{ACTION} --device=$env{DEVNAME}\"" > /etc/udev/rules.d/99-android.rules
sudo chmod a+rx /etc/udev/rules.d/99-android.rules
@chyuaner
chyuaner / 將shell換成zsh
Created April 6, 2013 08:17
將shell換成zsh
$ pacman -S zsh #安裝zsh(以ArchLinux示範)
$ chsh -s /bin/zsh
$ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
$ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
# nano ~/.zshrc
可參考https://github.com/robbyrussell/oh-my-zsh/wiki/themes
在ZSH_THEME那邊修改成你自己想用的佈景
然後按下Ctrl+o儲存,再按Ctrl+x離開
先做好硬碟分割
PS. 本人指令功力不足(掩面),我會先藉助Gparted圖形介面分割軟體做好分割,分割後記得等等要安裝的分割區代號(像是/dev/sda3那種)
掛載要安裝的分割區
$ mount /dev/sda3 /mnt #我是安裝在sda3分割區
$ dhcpcd #開啟有線網路自動抓取IP
$ pacstrap /mnt base base-devel #安裝Linuix所需基本檔案環境
產生需要的自動掛載設定檔
$ genfstab -p /mnt >> /mnt/etc/fstab