Skip to content

Instantly share code, notes, and snippets.

神楽坂玲奈 zh99998

Block or report user

Report or block zh99998

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View discuz_x.rb
# 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'
@zh99998
zh99998 / aggregate-cidr-addresses.pl
Last active Sep 17, 2015 — forked from denji/aggregate-cidr-addresses.pl
Take a list of CIDR address blocks and combine them, for example, 192.168.0.0/24 and 192.168.1.0/24 gives 192.168.0.0/23. I usually use "list-iana-reserved-ranges | aggregate-cidr-addresses" to get a list of blocks to not report with firewall log processing.
View aggregate-cidr-addresses.pl
#!/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.
#
@zh99998
zh99998 / smokeping.psgi
Last active Sep 16, 2015 — forked from dne/smokeping.psgi
Smokeping PSGI app
View smokeping.psgi
#!/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();
@zh99998
zh99998 / maotama.rb
Last active Aug 29, 2015
maotama for rpg maker
View maotama.rb
module Maotama
Achievements = [
21..28
]
def self.unlock_achievement(type, id)
STDOUT.write("<maotama><achievement type='#{type}' id='#{id}'/></maotama>")
STDOUT.flush
end
end
@zh99998
zh99998 / download.php
Last active Dec 15, 2015 — forked from chengyuhui/download.php
downloads for mycard
View download.php
<?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';
@zh99998
zh99998 / ucenter-wrapper.php
Last active Dec 14, 2015
Work-around api for ucenter. Across the php we can reach every corner in the world!
View ucenter-wrapper.php
<?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)){
@zh99998
zh99998 / mycard.nginxconf
Last active Dec 12, 2015
mycard-web-front
View mycard.nginxconf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
@zh99998
zh99998 / gplus.quick_mention.user.js
Created Sep 30, 2012 — forked from quietlynn/gplus.quick_mention.user.js
Google+ Quick Mention => Mention G+ users quickly.
View gplus.quick_mention.user.js
/*
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
You can’t perform that action at this time.