os version:
cat /System/Library/CoreServices/SystemVersion.plist
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
http://jiazhoulvke.com/?p=111 | |
:UseVimball ~/.vim/bundle/plugin_name |
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
#!/bin/sh | |
args=$@ | |
path=${args#vim} | |
gnome-terminal -e "vim $args" | |
#!/bin/sh | |
args=$@ | |
${args#vim} | |
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
body{ | |
background: #000; | |
font-family: Georgia, Palatino, serif; | |
color: #EEE; | |
line-height: 1; | |
padding: 30px; | |
margin:auto; | |
max-width:42em; | |
} | |
h1, h2, h3, h4 { |
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
<?php | |
/** | |
* POWER PHLOGGER Shared Library | |
* Pixel generation class | |
* | |
* output of 1 pixel transparent/color gif | |
* call this file directly in an IMG-tag. | |
* syntax: <img src="phpixel.php"> for a transparent pixel | |
* or: <img src="phpixel.php?c=FFFF00"> yellow | |
* |
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
<?php | |
/** | |
* PHP gen redis protocol function | |
* author: h2ero <[email protected]> | |
* date: 2013-07-24 15:01:42 | |
* useage: php gen_redis_proto.php | redis-cli --pipe | |
*/ | |
function gen_redis_proto() | |
{ | |
$CRLF = "\r\n"; |
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
! emulate XTerm for proper recognition of key combinations in Vim | |
!URxvt.keysym.Up : \033[A !breaks arrow keys in Vim | |
!URxvt.keysym.Down : \033[B !breaks arrow keys in Vim | |
!URxvt.keysym.Right : \033[C !breaks arrow keys in Vim | |
!URxvt.keysym.Left : \033[D !breaks arrow keys in Vim | |
!URxvt.keysym.Page_Up : \033[5~ !breaks scrolling in Rxvt | |
!URxvt.keysym.Page_Down : \033[6~ !breaks scrolling in Rxvt | |
!URxvt.keysym.Home : \033[H !breaks navigation in Vim | |
!URxvt.keysym.End : \033[F !breaks navigation in Vim | |
URxvt.keysym.S-Up : \033[1;2A |
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
#! /bin/sh | |
# awk export mysql table info with markdown table | |
awk ' | |
BEGIN{ | |
} | |
{ | |
if($0~/CREATE/){ | |
gsub("`", "", $6) | |
print "### "$6 | |
print "\n" |
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
#! /bin/sh | |
find ./ -iname "*html" | xargs -i sed -i '{ | |
s/\(<li>\)\(.*\): \(<a.*>\)\(.*\)\(<\/a>\)/\1\4\3\2\5/ | |
}' {} |
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
<?php | |
interface Worker | |
{ | |
public function getCommand(); | |
public function done($stdout, $stderr); | |
public function fail($stdout, $stderr, $status); | |
} |
OlderNewer