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
BrowserMatch "^DoCoMo/[1-2]\.0" Browser_FP=1 | |
BrowserMatch "^UP\.Browser/[1-9]\.[0-9]" Browser_FP=1 | |
BrowserMatch "^KDDI-[A-Z0-9]+ UP\.Browser/[1-9]\.[0-9]" Browser_FP=1 | |
BrowserMatch "^J-PHONE/1\.0" Browser_FP=1 | |
BrowserMatch "^Vodafone/[1-2]\.0" Browser_FP=1 | |
BrowserMatch "^SoftBank/[1-9]\.0" Browser_FP=1 | |
<If Browser_FP> | |
RewriteEngine On | |
RewriteRule /* /unsupported.html [L] | |
</If> |
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/env ruby | |
# iOS App Store Crawler by Nowa <nowazhu@gmail.com> | |
# 2010-08-04 | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
USERAGENT = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4' | |
LETTERS = %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z *} |
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
server { | |
set $browse_os ""; | |
if ($uri !~ ^/support_for_windows_xp_has_ended){ | |
set $browse_os "X"; | |
} | |
if ($http_user_agent ~ "Windows NT 5\.[12]") { | |
set $browse_os "${browse_os}P"; | |
} | |
if ($browse_os = "XP"){ | |
return 302 /support_for_windows_xp_has_ended; |
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
function randomString(length,numNumeric,numLCase,numUCase,numSymbols){ | |
length=length||16;numNumeric=numNumeric||3,numLCase=numLCase||3,numUCase=numUCase||3,numSymbols=numSymbols||3; | |
var charsList = [ | |
'0123456789', | |
'abcdefghijklmnopqrstuvwxyz', | |
'ABCDEFGHIJKLMNOPQRSTUVWXYZ', | |
'!"#$%&\'()*+,-./\\:;<=>?@[]^_`{|}~' | |
], | |
charLength = [numNumeric,numLCase,numUCase,numSymbols], | |
str="",i=0; |
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
def create_cell(): | |
cell =[] | |
for line in open('p.txt', 'r'): | |
line = list(line.rstrip()) | |
cell.append(line) | |
return cell | |
def chaise(cell, x, y): | |
if cell[x][y] == 'c': | |
return False |
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 | |
# | |
# chkconfig: - 90 20 | |
# description: apache-solr | |
# | |
if [ -f /etc/rc.d/init.d/functions ]; then | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
elif [ -f /etc/rc.status ]; then |
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[1] : hostname | |
# args[2] : access | error | |
# args[3] : date[yyyy/mm] | |
# | |
filehost="*" | |
filetype="access" |
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/bash | |
# for use with cron, eg: | |
# 0 3 * * * root /home/www/batch/bin/backup.sh /var/backup/www | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <PATH>" | |
exit 1 | |
fi |
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 { | |
margin: 0; | |
padding: 0; | |
background-color: #fff; | |
background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), | |
linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd); | |
background-size: 18px 18px; | |
background-position: 0 0, 9px 9px; | |
overflow: hidden; | |
} |
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 | |
BRANCH=master | |
if [ $# -ge 1 ]; then | |
BRANCH=$1 | |
fi | |
if [ "$SUDO_USER" != "" ] && [ "$SUDO_USER" != "git" ]; then | |
echo 'You are not user "git".' |
OlderNewer