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
# encoding: utf-8 | |
# | |
# Author: Erick Guan <fantasticfears@gmail.com> | |
# | |
# This script import the data from latest Discuz! X | |
# Should work among Discuz! X3.x | |
# This script is tested only on Simplified Chinese Discuz! X instances | |
# If you want to import data other than Simplified Chinese, email me. | |
require 'php_serialize' |
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
#!/usr/bin/perl | |
# | |
# aggregate-cidr-addresses - combine a list of CIDR address blocks | |
# Copyright (C) 2001,2007 Mark Suter <suter@zwitterion.org> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use CGI::Emulate::PSGI; | |
my $app = CGI::Emulate::PSGI->handler(sub { | |
use CGI; | |
use Smokeping; | |
CGI::initialize_globals(); |
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
module Maotama | |
Achievements = [ | |
21..28 | |
] | |
def self.unlock_achievement(type, id) | |
STDOUT.write("<maotama><achievement type='#{type}' id='#{id}'/></maotama>") | |
STDOUT.flush | |
end | |
end |
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 | |
function detect() { | |
$userAgent = strtolower($_SERVER['HTTP_USER_AGENT']); | |
// Identify the browser. Check Opera and Safari first in case of spoof. Let Google Chrome be identified as Safari. | |
if (preg_match('/opera/', $userAgent)) { | |
$name = 'opera'; | |
} | |
elseif (preg_match('/webkit/', $userAgent)) { | |
$name = 'safari'; |
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 | |
include './config.inc.php'; | |
include './uc_client/client.php'; | |
$function = 'uc_'.$_REQUEST['action']; | |
if(function_exists($function)){ | |
$paramters = json_decode($_REQUEST['paramters']); | |
if(UC_CHARSET != 'UTF-8'){ | |
foreach($paramters as $index => $paramter){ | |
if(is_string($paramter)){ |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl; | |
listen [::]:443 ssl; |
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
/* | |
Google+ Quick Mention => Mention G+ users quickly. | |
Copyright (C) 2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |