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 | |
// | |
// http://homepage.mac.com/phrogz/CSV2vCard_v2.html | |
// http://en.wikipedia.org/wiki/VCard | |
// Test CentOS 5.7 PHP 5.3.3 | |
// 2011/12/23 by nansen.su | |
// 2012/02/16 support Thunderbird 10 | |
$field=array( | |
array('名稱','prefix'), |
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
Source http://brooky.cc/2012/05/18/給工程師-生命就該浪費在有意義的事上 | |
給工程師 – 生命就該浪費在有意義的事上 | |
Posted on May 18, 2012 by brooky | |
前幾天看了 Mr. jamie 的文章年輕人,勇敢加入「明日」的台積電吧!, 剛好幾前天朋友也轉寄了一篇Life is too short to write shitty software給我,裡面講到 | |
Life’s too short to be creating shitty software. |
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 | |
$pdf_dir='./pdf'; | |
$pdf_dir=realpath($pdf_dir); | |
$imgcov='"C:\Program Files\ImageMagick-6.7.8-Q16\convert.exe" -density 300 "%s" "%s"'; | |
$f=opendir($pdf_dir); | |
while(($name=readdir($f))!==false){ | |
$file=$pdf_dir.'\\'.$name; | |
if(!is_dir($file)){ |
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
<html> | |
<head> | |
<title>Mongodb Status <?php echo date('Y/m/d H:i:s');?></title> | |
<style type="text/css"> | |
table,td{border:1px solid #000;} | |
.coll{margin-left:50px;} | |
</style> | |
</head> | |
<body> | |
<h3>MongoDB Status</h3> |
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 | |
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) | |
s.setsockopt(socket.SOL_SOCKET,socket.SO_BROADCAST,1) | |
s.bind(('0.0.0.0',68)) | |
mymac='\x01\x02\x03\x04\x05\x06' #your MAC Address | |
magic_cookie='\x63\x82\x53\x63' | |
pkg='\x01\x01\x06\x00\x11\x22\x33\x44' + ('\x00'*20) + mymac + ('\x00'*202) + magic_cookie |
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 | |
if(isset($_SERVER['HTTP_USER_AGENT'])){ | |
$l=array('Android','iPhone','iPad'); | |
foreach($l as $item){ | |
if(stripos($_SERVER['HTTP_USER_AGENT'],$item)!==false && !isset($_GET['pda'])){ | |
header('location: ?pda'); | |
exit; | |
} | |
} | |
} |
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 script is a local post-update hook script. | |
// http://tortoisesvn.googlecode.com/svn/trunk/contrib/hook-scripts/client-side/PostUpdate.js.tmpl | |
var objArgs,num; | |
objArgs = WScript.Arguments; | |
num = objArgs.length; | |
if (num != 5) | |
{ | |
WScript.Echo("Usage: [CScript | WScript] PostUpdate.js path/to/pathsfile depth revision error path/to/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
# Kickstart file automatically generated by anaconda. | |
install | |
text | |
cdrom | |
lang en_US.UTF-8 | |
keyboard us | |
%include /tmp/rootpw | |
authconfig --enableshadow --passalgo=sha512 | |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script type="text/javascript"> | |
var count=0; | |
$(window).blur(function(){ | |
console.log('out'); | |
$('#msg').data('where','out'); | |
}); |
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 | |
// Usage: | |
// #tcpdump -i eth1 -n|grep domain|php dns_rec.php | |
// #nohup tcpdump -i eth1 -n|grep domain|php dns_rec.php & | |
// | |
ini_set('memory_limit','256M'); | |
$qmap=array(); | |
define('LOG_PATH','/root/dns_%s.csv'); | |
$f=fopen('php://stdin','r'); |
OlderNewer