This file contains hidden or 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://paste.ubuntu.com/23654022/ | |
Office手动激活命令: | |
cd C:\Program Files\Microsoft Office\Office15 | |
cscript ospp.vbs /sethst:192.168.123.1 | |
cscript ospp.vbs /act | |
cscript ospp.vbs /dstatus | |
windows手动激活命令 |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: KMS v6 emulator | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Emulated KMS Servers on non-Windows platforms |
This file contains hidden or 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://jeffreysambells.com/2012/10/25/human-readable-filesize-php | |
function human_filesize($bytes, $decimals = 2) { | |
$size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB'); | |
$factor = floor((strlen($bytes) - 1) / 3); | |
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor]; | |
} | |
echo human_filesize(filesize('example.zip')); |
This file contains hidden or 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 | |
print "\n"; | |
$rsa = file_get_contents('rsa.pub'); | |
$ssh = file_get_contents('ssh.pub'); | |
// For reference | |
print $rsa . "\n\n"; | |
print $ssh . "\n\n"; |
This file contains hidden or 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
SELECT t.trip_id, s.departure_time, t.trip_headsign | |
FROM gtfs_stop_times s | |
JOIN gtfs_trips t ON s.trip_id = t.trip_id | |
WHERE s.stop_id = 99005 AND s.departure_time >= "17:10:53" | |
AND s.danp_last_stop IS NULL | |
AND t.service_id IN (SELECT c.service_id FROM gtfs_calendar c | |
LEFT JOIN gtfs_calendar_dates d ON d.service_id = c.service_id AND d.date = "20130304" | |
WHERE c.start_date <= "20130304" AND c.end_date >= "20130304" AND c.monday = 1 AND d.service_id IS NULL | |
UNION SELECT service_id FROM gtfs_calendar_dates d WHERE d.date = "20130304" AND d.exception_type = 1) | |
ORDER BY s.departure_time LIMIT 2; |
This file contains hidden or 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>jsonp test</title> | |
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('#select_link').click(function(e){ | |
e.preventDefault(); | |
console.log('select_link clicked'); | |
This file contains hidden or 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 | |
define('DB_HOST', 'localhost'); | |
define('DB_USER', 'bla'); | |
define('DB_PASS', 'bla'); | |
define('DB_BASE', 'bla'); | |
define('DB_CONN', 'mysql:host='.DB_HOST.';dbname='.DB_BASE); | |
// Buildin singleton class |