mess

许多待整理凌乱的东西暂时先放这里,等攒攒多了有头绪了再整理归类。

Leetcode

wireshark

$ sudo dpkg-reconfigure wireshark-common
选择 Yes
然后将自己的用户加入 wireshark 

gimp

celery


RabbitMQ

monit

official site

ip location

regular expression

comments should be sentence

Start with a capital, have a subject and a verb, use a complete sentence, end with a period.

The reasons:

Text to ascii art

Share files

Linux 使用投影仪

我的使用场景为:Linux Mint 16,Nvidia GTX570m 显卡,已经安装闭源驱动。

  1. 首先接上投影仪
  2. nvidia-settting 然后自己点鼠标操作 Xserver Displayer Configuration 操作
  3. 选择 clone 和相应分辨率 (具体有点忘记,下次看看去)

这样基本就能用了,但是由于我的是 1080P 的屏幕,投影仪的最高分辨率为 1366*768, 所以只能显示自己笔记本屏幕上的一部分,但是勉强能用了 =。=

Mouse

$ xset m 1 5

Ipython + matplotlib

MC

Video streaming

Free ssl certificate(startssl)

Vim 4913

The reason:

/*
 * Check if we can create a file and set the owner/group to
 * the ones from the original file.
 * First find a file name that doesn't exist yet (use some
 * arbitrary numbers).
 */
STRCPY(IObuff, fname);
for (i = 4913; ; i += 123)
{
    sprintf((char *)gettail(IObuff), "%d", i);
    if (mch_lstat((char *)IObuff, &st) < 0)
        break;
}

Reference:

Presentation

开启 crontab 的日志

$ sudo vim /etc/rsyslog.d/50-default.conf

去掉注释符 # (第十行大概)

#cron.*              /var/log/cron.log

重启 rsyslog

$ sudo /etc/init.d/rsyslog restart

ssh 遇到 permission denied (publickey)

查看账户 home 目录下的 .ssh 目录的权限 755,所有者和所属组是否是自己。

scp(secure copy)

get file from server:

$ scp -P port root@server_ip:/remote/path/file  /local/path/file

get dir from server:

$ scp -P port -r root@server_ip:/remote/dir/ /local/dir/

send file to server:

scp -P port /local/path/file root@server_ip:/remote/path/file

send dir to server:

scp -P port -r /local/dir/ root@server_ip:/remote/dir/

Add swap on LinuxMint 16(build YCM need swap)

crete a 2G(example) file by typing:

$ sudo fallocate -l 2G /swapfile

verify:

$ ls -lh /swapfile
-rw-r--r-- 1 root root 2.0G Jul 24 17:19 /swapfile

enabling the swap file

lock down the permissions by typing:

$ sudo chmod 600 /swapfile

set up the swap space:

$ sudo mkswap /swapfile
Setting up swapspace version 1, size = xxxxx KiB
no label, UUID=xxxxxx

enable it:

$ sudo swapon /swapfile

check:

$ sudo swapon -s
 Filename                Type        Size    Used    Priority
/swapfile               file        xxxxxx    0       -1

Reference

Todo