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
# replace the value of 'id=xxxx' to your app id | |
curl -H 'Host: itunes.apple.com' \ | |
-H 'Accept-Language: en-us, en;q=0.50' \ | |
-H 'X-Apple-Store-Front: 143444,5' \ | |
-H 'X-Apple-Tz: 3600' \ | |
-U 'iTunes/9.2.1 (Macintosh; Intel Mac OS X 10.5.8) AppleWebKit/533.16' \ | |
"http://itunes.apple.com/WebObjects/MZStore.woa/wa/customerReviews?s=143444&id=xxxxxxxxx&displayable-kind=11" |
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 | |
# Generates changelog day by day | |
# | |
# Defaults | |
# | |
VERSION="0.1" | |
AUTHOR="icyleaf <[email protected]>" | |
# | |
# Variables |
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
PROMPT=$'$(virtualenv_prompt_info)%{$fg_bold[green]%}%n@%m %{$fg[blue]%}[%~]%{$reset_color%} $(git_prompt_info)\ | |
%{$fg[blue]%}%B$%b%{$fg_bold[white]%}%{$fg[white]%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest ...> | |
<application ...> | |
<activity ...> | |
<meta-data android:name="UMENG_APPKEY" android:value="UMENG-API-KEY" /> | |
<meta-data android:name="UMENG_CHANNEL" android:value="Development" /> | |
</application> | |
<uses-permission android:name="android.permission.INTERNET" /> |
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 | |
# Change this line to the URI path of the xcode DMG file. | |
# XCode 3.2.5 | |
#XCODE_PATH="/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg" | |
# XCode 4 | |
#XCODE_PATH="/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg" |
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 | |
# | |
# This script is a helper that it will help you download Alpaca and initial structure to current path. | |
# To install elsewhere you can just clone https://github.com/icyleaf/alpaca anywhere you like. | |
# | |
# AUTHOR icyleaf <[email protected]> | |
# VERSION 0.1 | |
# | |
echo "Clone the alpaca project from Github" |
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 | |
# | |
# git autodeploy script when it matches the string "[deploy]" | |
# | |
# @author icyleaf <[email protected]> | |
# @link http://icyleaf.com | |
# @version 0.1 | |
# | |
# Usage: | |
# 1. put this into the post-receive hook file itself below |
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 | |
/** | |
* Parse HTML entries for allowed tags | |
* | |
* @author icyleaf <[email protected]> | |
* @version 0.1 | |
*/ | |
class Text extends Kohana_Text{ | |
//don't parse anything in these tags | |
public static $literals = array('code', 'pre'); |
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 new_consumer_key() | |
{ | |
// in case /dev/urandom is reusing entropy from its pool, let's add a bit more entropy | |
$entropy = uniqid(mt_rand(), true); | |
$hash = sha1($entropy); // sha1 gives us a 40-byte hash | |
// The first 30 bytes should be plenty for the consumer_key | |
// We use the last 10 for the shared secret | |
return array( |
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
class Validate { | |
/** | |
* Validate a Chinese ID (18 digit ONLY). | |
* @param int ID | |
* @return boolean | |
*/ | |
public static function chinese_id($id) | |
{ | |
$id_length = strlen($id); | |
if ($id_length == 18) |