Skip to content

Instantly share code, notes, and snippets.

View itbakery's full-sized avatar

sawangpong muadphet itbakery

View GitHub Profile
@itbakery
itbakery / index.html
Last active August 29, 2015 14:15
leftletdray
<!DOCTYPE html>
<html>
<head>
<title>Simple Leaflet Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
<link
@itbakery
itbakery / index.html
Last active August 29, 2015 14:15 — forked from d3noob/.block
<!DOCTYPE html>
<html>
<head>
<title>Leaflet and D3 Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
@itbakery
itbakery / vim
Created February 12, 2015 07:11
vim installation
sudo yum install hg
hg clone https://vim.googlecode.com/hg/ vim
cd ~/.vimrc
vim ~/.vimrc
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
sudo yum install libX11 libX11-devel libXtst-devel libXtst
sudo yum install lua-devel
sudo yum install ncurses-libs gnome-libs-devel libgnomeui-devel gtk2-devel libbonoboui-devel libX11-devel libXpm-devel libXt-devel python-devel ruby-devel cairo-devel ncurses-devel
cd vim/
./configure --enable-rubyinterp --with-features=HUGE --with-lua-prefix=/usr --enable-gnome-check --enable-gui --enable-luainterp=yes --enable-gui=gtk2 --with-x=yes --enable-pythoninterp --prefix=/usr --enable-multibyte --enable-gtk2-check --enable-gtk2-check --enable-gnome-check --with-features=huge --with-x
@itbakery
itbakery / LPI1-101-Table of Contents.md
Last active August 29, 2015 14:21
LPI1-101-Table of Contents

#Table of Contents

##Linux Server Professional Certification LPIC-1 : Exam 101

###Topic 101: สถาปัตยกรรมระบบ System Architecture 1

  • 101.1 การระบุและปรับแต่งฮาร์ดแวร์ (Determine and configure hardware setting) 1
  • 101.2 ฺกลไกการเริ่มต้นBoot ของระบบ (Boot the system) 10
  • 101.3 วิธีการเปลี่ยน runlevels การปิดระบบ (shutdown) และการ Reboot เครื่อง 15

###Topic 102: การติดตั้ง Linux และ การบริหารจัดการ package 25

@itbakery
itbakery / lpi1-topic101.md
Created May 15, 2015 14:00
LPI1-Topic 101 สถาปัตยกรรมระบบ System Architecture

##Linux Server Professional Certification LPIC-1 : Exam 101 ###Topic 101: สถาปัตยกรรมระบบ System Architecture ####101.1 การระบุและปรับแต่งฮาร์ดแวร์ (Determine and configure hardware setting) มีวัตถุประสงค์เพื่อการเรียนรู้เกี่ยวกับการกำหนดค่าของ hardware ซึ่งเป็นพื้นฐานสำคัญของการศึกษาระบบปฎิบัติการ Linux

  1. HAL, dbus, udev
  2. /sys, /proc , /dev
  3. lsmod, lsusb, lspci และเรียนรู้เกี่ยวกับการกำหนดค่าต่างๆ ที่เกี่ยวข้องกับ Linux
  4. set device ID
  5. kernel module
@itbakery
itbakery / lpi1-topic102.md
Created May 15, 2015 16:49
lpi1-topic102.md

###Topic 102: การติดตั้ง Linux และ การบริหารจัดการ package 102.1 การออกแบบ Layout ของ hard disk เพื่อการใช้งาน (Design hard disk layout) filesystem ใน linux เริ่มต้นจาก / (root) และแบ่งตามวัตถุประสงค์ มีลักษณะที่เป็น hierarchy

root_file_system

/ (root) เป็นfile systemที่อยู่บนสุดของโครงสร้าง /var ทำหน้าเก็บ variable filesystem >/home ทำหน้าเก็บข้อมูลของ User ที่อยู่ใน linux

@itbakery
itbakery / lpi1-topic103.md
Created May 15, 2015 18:34
lpi1-topic103.md

###Topic 103: GNU and unix Commands 103.1 การใช้งาน Command Line เรียนรู้การใช้งานคำสั่งใน linux ผ่านทาง Linux Shells ในที่นี้จะใช้ bash shells, shell ซึ่งเป็นโปรแกรมที่สามารถรองรับคำสั่ง command ได้

การใช้งาน shell environment ทดลองคำสั่ง ดู password

# cat /etc/passwd 
root:x:0:0:root:/root:/bin/bash 			<-- root login แล้วไปใช้ bash shell
@itbakery
itbakery / lpi1-topic104.md
Created May 15, 2015 20:18
lpi1-topic104

###Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard Harddisk ถูกแบ่งออกได้เป็นPartition ก่อนการใช้งาน โดยแต่ละ partition สามารถแบ่งออกได้หลายชนิด และสอดคล้องกับFile System โดย default สามารถแบ่ง patitionได้ไม่เกิน4 primary partition เช่น device (disk) /dev/sda สามารถแบ่งได้เป็น /dev/sda1 /dev/sdb2 /dev/sdb3 /dev/sdb4 หลังจากนั้นสามารถสร้าง filesystems บน partition ได้โดยตรงหรือนำpartition ไปสร้างเป็น physical volumes เพื่อนำไปสร้างเป็นlogical volume ก่อนที่จะสร้าง filesystems บน logical volumeพอสรุปได้ดังนี้

  1. Harddisk (Device) -> Partition -> FileSystems (format)
  2. Harddisk (Device) -> Partition -> Physical Volumes -> Logical Volume -> FileSystems (format) -> Mount
  3. Harddisk (Device) -> Partition -> Software RAID (mdadm) -> RAID[0,1,5] -> FileSystems (format) -> Mount

partition

ตัวอย่างการใช้งาน partition ร่วมกับ physical volumes

## RHEL 7 Network Teaming
```sh
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
(1..2).each do |i|
config.vm.define "server#{i}" do |node|
node.vm.hostname = "server#{i}"
@itbakery
itbakery / install-deps-with-android.sh
Created September 30, 2017 16:48 — forked from danielgomezrico/install-deps-with-android.sh
Android - install dependencies to build android projects on linux/ci/other using sdkmanager/android terminal tools
#!/usr/bin/env bash
#
# Install required dependencies with android command
#
for DEP in android-25 \
build-tools-25.0.2 \
tool \
extra-android-m2repository \
extra-android-support \