Forked from A Non Ymous's Pen sbIEt.
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
sudo apt install build-essential autoconf bison flex texinfo \ | |
help2man gawk libtool libtool-bin libtool-doc libncurses5-dev python3-dev \ | |
python3-distutils git unzip | |
git clone http://github.com/crosstool-ng/crosstool-ng | |
cd crosstool-ng | |
./bootstrap | |
./configure --enable-local | |
DEFCONFIG=samples/armv8-rpi3-linux-gnueabihf/crosstool.config ./ct-ng defconfig |
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
# ~/.oh-my-zsh/custom/tjkirch-with-ruby.zsh-theme | |
function _update_ruby_version() | |
{ | |
typeset -g ruby_version='' | |
if which rvm-prompt &> /dev/null; then | |
ruby_version="$(rvm-prompt i v g)" | |
rvm-prompt i v g | |
else | |
if which rbenv &> /dev/null; 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 | |
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb | |
sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt-get update | |
sudo apt-get install -y erlang | |
sudo apt-add-repository -y ppa:bigkevmcd/elixir | |
sudo apt-get update | |
sudo apt-get install -y elixir |
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 _update_ruby_version() | |
{ | |
typeset -g ruby_version='' | |
if which rvm-prompt &> /dev/null; then | |
ruby_version="$(rvm-prompt i v g)" | |
rvm-prompt i v g | |
else | |
if which rbenv &> /dev/null; then | |
ruby_version="$(rbenv version | sed -e "s/ (set.*$//")" | |
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
git archive --remote {remote repository} {branch name/tree-ish} {file path} | tar -x --strip-components={directory depth} |
本SDKは下記の機能を含めています。
- Tencent Weiboの認証(OAuth 2.0)
- Tencent WeiboのAPI
- 投稿、シェアモジュール
APIバージョン:1.3
中国語版へのリンク
-
iOS SDKのダウンロード
SDKのダウンロードページ -
SDKの構成
iOS SDK v1.3は下記の二つから構成されている。
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
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)aRequest navigationType:(UIWebViewNavigationType)navigationType { | |
NSDictionary *headers = [aRequest allHTTPHeaderFields]; | |
BOOL hasWhateverAddedHeader = NO; | |
for(NSString *key in [headers allKeys]) { | |
if([[key lowercaseString] isEqualToString:@"my-added-header"]) { | |
hasWhateverAddedHeader = YES; | |
break; | |
} | |
} |
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 wpautop(pee, br = true) | |
return '' if pee.strip == '' | |
pee = "#{pee}\n" # just to make things a little easier, pad the end | |
pee = pee.gsub(/<br \/>\s*<br \/>/, "\n\n") | |
# pace things out a little | |
allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; | |
pee = pee.gsub(Regexp.new('(<'+allblocks+'[^>]*>)'), "\n"+'\1') | |
pee = pee.gsub(Regexp.new('(<\/'+allblocks+'[^>]*>)'), '\1' + "\n\n") | |
pee = pee.gsub(/\r\n|\r/, "\n") # cross-platform newlines | |
if pee.include?('<object') |
NewerOlder