Skip to content

Instantly share code, notes, and snippets.

View lidaobing's full-sized avatar
🦍
Mammal - verified by Github

LI Daobing lidaobing

🦍
Mammal - verified by Github
View GitHub Profile
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="articleid">
<metadata>
<dc:identifier xmlns:dc="http://purl.org/dc/elements/1.1/" id="articleid">_id2761152</dc:identifier>
<dc:title xmlns:dc="http://purl.org/dc/elements/1.1/">风起陇西</dc:title>
<dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"></dc:creator>
<dc:date xmlns:dc="http://purl.org/dc/elements/1.1/">作者:马伯庸</dc:date>
<dc:language xmlns:dc="http://purl.org/dc/elements/1.1/">en</dc:language>
</metadata>
<manifest>
@lidaobing
lidaobing / gist:2349909
Created April 10, 2012 09:47
sohu weibo api failed
POST /statuses/update.json HTTP/1.1
Accept: */*
User-Agent: OAuth gem v0.4.5
Content-Length: 15
Authorization: OAuth oauth_body_hash="R%2Fs6xQidsVLIcI%2BLU2rYuHj5ZUY%3D", oauth_consumer_key="kingsoft_6Apg5WMy", oauth_nonce="rouSmpDBunUrIy83hZPwCK7ngasZ3q65YrWLI46300", oauth_signature="kRIu61DfRia0K3MLHpf7cY3WcsA%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1334050556", oauth_token="327b503581d933cceb5a88797ad11d6b", oauth_version="1.0"
Connection: close
Host: api.t.sohu.com
Content-Type: application/x-www-form-urlencoded
status=foobar23
@lidaobing
lidaobing / brew --config
Created April 30, 2012 07:34
"brew install libglade" failed
HOMEBREW_VERSION: 0.9
HEAD: e576a60c6588a68b6294d13096c5e645cfe4d965
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: N/A
diff --git a/Makefile.in b/Makefile.in
index 7cdb9aa..93afc5b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -207,7 +207,7 @@ AC_CFLAGS = -Wall @ICONV_INCLUDES@ @OS_TYPE@
ACLOCAL_AMFLAGS = -I m4
cconv_SOURCES = cconv.c main.c unicode.c
cconv_CFLAGS = ${AC_CFLAGS}
-cconv_LDFLAGS = @ICONV_LIBS@
+cconv_LDFLAGS = @ICONV_LIBS@ -liconv
# from China
ldb@Lis-MacBook-Pro:~$ curl -I http://www.dnspod.com/
HTTP/1.1 302 Moved Temporarily
Content-Length: 0
Date: Wed, 16 May 2012 11:32:45 GMT
Connection: Keep-Alive
Location: http://www.dnspod.cn/
Content-Type: text/html
ldb@Lis-MacBook-Pro:~$ tsocks curl -I http://dnspod.com/
ldb@Lis-MacBook-Pro:~$ curl -I http://dnspod.com/ncr
HTTP/1.1 302 Moved Temporarily
Set-Cookie: ncr=1
Content-Length: 0
Date: Wed, 16 May 2012 13:41:10 GMT
Connection: Keep-Alive
Location: http://www.dnspod.com
Content-Type: text/html
this cookie only works in dnspod.com not in www.dnspod.com, FAIL
<!-- this one works, but ugly in IE7 -->
<div style="width:220px;text-align:center">
<a href="#">
<img src="foo16.png" />
</a>
</div>
<!-- this one not works in IE8 standard mode -->
<div style="width:220px;text-align:center">
<a href="#">
desc 'Generate tags page'
task :tags do
puts "Generating tags..."
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')
---
layout: default
---
<h2 id="approx">Postings tagged "{{ page.tag_name }}"</h2>
<ul class="posts">
{% for post in site.tags[page.tag_name] %}
{% include post_as_li.html %}
{% endfor %}
</ul>
desc 'Generate tag cloud'
task :tag_cloud do
puts "Generating tag_cloud..."
require 'rubygems'
require 'jekyll'
include Jekyll::Filters
options = Jekyll.configuration({})
site = Jekyll::Site.new(options)
site.read_posts('')