Skip to content

Instantly share code, notes, and snippets.

View iguoli's full-sized avatar
🤣
laugh cry

Guo Li iguoli

🤣
laugh cry
View GitHub Profile
@iguoli
iguoli / shadowsocks.json
Created May 22, 2017 04:47
shadowsocks config file
{
"server":"your-server-ip",
"port_password":{
"443":"password"
"1080":"password"
},
"local_address":"127.0.0.1",
"local_port":1080,
"timeout":300,
"methond":"aes-256-cfb",
@iguoli
iguoli / fbterm.md
Last active May 31, 2017 07:14
Using fbterm at runlevel 3
@iguoli
iguoli / xargs.md
Last active June 5, 2017 18:05
xargs命令

xargs命令

xargs [options] [command]

xargs从标准输入读取数据,将数据转换为command命令的参数来执行该命令。从标准输入读取数据时,使用空格或换行符作为默认分隔符,如果没有指定命令,使用/bin/echo作为默认命令。

xargs默认将所有从标准输入读取的数据转换为一行参数传递给命令

比如/tmp目录下有a, b, c三个文件,用ls -1命令显示为

$ ls -1 /tmp
@iguoli
iguoli / Systemd.md
Last active June 22, 2017 10:58
Systemd学习笔记
@iguoli
iguoli / fontconfig-infianlity.md
Last active June 23, 2017 08:43
使用fontconfig-infianlity改善Linux字体渲染

使用fontconfig-infianlity改善Linux字体渲染

基于Linux Mint发行版本

用infinality美化你的字体

  1. 添加fontconfig-infinality的软件源并安装
sudo add-apt-repository ppa:no1wantdthisname/ppa
sudo apt update
sudo apt install fontconfig-infinality
@iguoli
iguoli / bc.md
Last active June 26, 2017 05:07
Linux下不同进制的数值转换

Linux下不同进制的数值转换

Linux命令行下,使用bc命令可以在不同进制下进行数值转换

十进制转二进制

echo "obase=2; 192" | bc

输出结果为11000000
其中obase是bc中特殊变量,表示bc以几进制输出结果,在上例中,obase=2,表示以二进制输出结果。
对应的还有一个特殊变量是ibase,表示bc以几进制读取输入数值,默认情况下,obase和ibase的值是10,

@iguoli
iguoli / tmux_cheatsheet.md
Last active July 15, 2017 11:20 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@iguoli
iguoli / database.md
Last active July 27, 2017 01:28
Database Lesson

Database Design

Normalization

Function Dependency

The relationship (with in relation) that describes how the value of one atrribute may be used to find the value of another attribute.

Determinant

An attribute that can be used to find the value of another attribue in the relation.

Candidate key

@iguoli
iguoli / LVM.md
Last active August 20, 2017 07:24
使用LVM添加新磁盘并扩展到根目录

使用LVM添加新磁盘

查找新增磁盘文件

sudo fdisk -l

Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
@iguoli
iguoli / oracle_installation.md
Last active August 21, 2017 00:25
Oracle Installation

创建Oracle用户和组


groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle(主组oinstall,其它组:dba)
passwd oracle

修改内核参数

sudo vim /etc/sysctl.conf