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
echo "Enter HostName:" | |
read host | |
echo "Enter DB Name:" | |
read dbname | |
echo "Enter Auth DB Name: (usually admin)" | |
read authdb | |
echo "Enter Username:" | |
read username | |
echo "Enter Password" | |
read password |
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 leftpad1(str, len, ch) { | |
if (!ch&&ch!=0) ch=' '; | |
len = len - str.length; | |
var pad = ''; var i = -1; | |
while (++i < len) { | |
pad = ch + pad; | |
} | |
return pad+str; | |
} |
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
SELECT zip, primary_city, | |
latitude, longitude, distance | |
FROM ( | |
SELECT z.zip, | |
z.primary_city, | |
z.latitude, z.longitude, | |
p.radius, | |
p.distance_unit | |
* DEGREES(ACOS(COS(RADIANS(p.latpoint)) | |
* COS(RADIANS(z.latitude)) |
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
15-05-25 10:27 | |
#color{{{ | |
autoload colors | |
colors | |
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do | |
eval _$color='%{$terminfo[bold]$fg[${(L)color}]%}' | |
eval $color='%{$fg[${(L)color}]%}' | |
(( count = $count + 1 )) |
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
# -*- coding: utf-8 -*- | |
#!/usr/bin/python | |
__author__ = 'Long' | |
import json | |
import os | |
import os.path | |
import time | |
import sys |
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
// | |
// CLCryptResponseSerializer.h | |
// CMD_project | |
// | |
// Created by Chenlong on 14-8-4. | |
// Copyright (c) 2014年 Chenlong. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "AFNetworking.h" |
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
# | |
# Author:yuer | |
# Email:[email protected] | |
#移除临时文件temp*.html | |
rm -rf temp*.html | |
#访问登录页面,获取以后要获得的三个值,具体三个值可以通过登录抓包看到,将返回结果的cookie保存到cookie.txt中,将返回的html保存到temp.htm中 | |
curl -D cookie.txt -s "http://bbs.stuhome.net/member.php?mod=logging&action=login" > temp.html | |
#for get formhash variable | |
formhash=`cat temp.html | sed -n '/"formhash"/p' | sed 's/"//g' | awk '{print $4}' | sed 's/value=//g'|sed q` | |
#for get loginhash variable |