This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat –apn |grep python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linux | |
===== | |
Created 星期二 17 五月 2016 | |
#### 复制文件内容 | |
cat ~/.ssh/id_rsa.pub | xclip -sel clip | |
#### find 命令查找文件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ll-proc-id | |
========== | |
Created 星期一 14 十一月 2016 | |
#### 查看正在运行程序的路径 | |
##### 命令 | |
* ll /proc/PID | |
* ll /proc/PID/cwd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql | |
===== | |
Created 星期三 30 三月 2016 | |
##### 数据库 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Smart pane switching with awareness of vim splits | |
# See: https://github.com/christoomey/vim-tmux-navigator | |
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"' | |
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("www.douban.com") { | |
#db-nav-sns { | |
visibility: hidden; | |
height: 0px; | |
} | |
.global-nav { | |
visibility: hidden; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
周末没有计划或者安排就是空过。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import sys | |
import random | |
from struct import pack | |
from struct import unpack | |
ROOMID = 58879 | |
HOST, PORT = "dm.live.bilibili.com", 788 | |
data = " ".join(sys.argv[1:]) | |
_protocolversion = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 将图片资源显示到页面中 | |
function showImage(imageData) { | |
var reader = new FileReader(); | |
reader.onload = function(e){ | |
var img = new Image(); | |
img.src = e.target.result; | |
document.body.appendChild(img); | |
}; | |
// 读取图片文件 | |
reader.readAsDataURL(imageData); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title></title> | |
<style type="text/css"> | |
#box{position: relative; width: 200px; height: 50px; border: 1px solid #eee; margin: 50px auto 0;} | |
#bg{height: 10px; margin-top: 19px; border: 1px solid #ddd; border-radius: 5px; overflow: hidden;} | |
#bgcolor{background: #5889B2; width: 0; height: 10px; border-radius: 5px;} | |
#bt{width: 34px; height: 34px; background: url(http://bbs.blueidea.com/data/attachment/album/201505/22/192934pwywwrt8cbrfwzfh.png) no-repeat center center; border-radius: 17px; overflow: hidden; position: absolute; left: 0px; margin-left: -17px; top: 8px; cursor: pointer;} |