This file contains hidden or 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 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
import re | |
def format_html(html): | |
'''给 html 添加适当换行,以便版本管理 | |
''' | |
html = re.sub('\n?\ ?<(address|blockquote|center|dir|div|dl|fieldset|form|h1|h2|h3|h4|h5|h6|hr|isindex|menu|noframes|noscript|ol|p|pre|table|ul|dd|dt|frameset|li|tbody|td|tfoot|th|thead|tr)([^>]*?)>', '\n<\\1\\2>', html) | |
html = re.sub('</(address|blockquote|center|dir|div|dl|fieldset|form|h1|h2|h3|h4|h5|h6|hr|isindex|menu|noframes|noscript|ol|p|pre|table|ul|dd|dt|frameset|li|tbody|td|tfoot|th|thead|tr)([^>]*?)>\ ?\n?', '</\\1\\2>\n', html) |
This file contains hidden or 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 -x | |
SIZE=1270x710 | |
unset SESSION_MANAGER XDG_SESSION_COOKIE DBUS_SESSION_BUS_ADDRESS DESKTOP_SESSION | |
#Xephyr -screen 1270x715 -ac +bs +xinerama -fakexa -dpi 110 :3 & | |
Xephyr -zaphod -screen $SIZE -ac +bs +xinerama -dpi 110 :3 & | |
sleep 1s | |
export DISPLAY=:3 | |
xrdb < ~/.Xresources | |
eval `dbus-launch --sh-syntax` | |
export XMODIFIERS=@im=fcitx QT_IM_MODULE=xim GTK_IM_MODULE=xim ; fcitx & sleep 1 |
This file contains hidden or 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
--- twip/include/twitteroauth.php 2012-02-18 08:13:25.000000000 +0000 | |
+++ twip/include/twitteroauth.php 2012-02-18 08:14:27.000000000 +0000 | |
@@ -219,6 +219,8 @@ | |
if (!empty($postfields)) { | |
$url = "{$url}?{$postfields}"; | |
} | |
+ case 'GET': | |
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-PHX: true')); | |
} | |
This file contains hidden or 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
2011-12-15 2AM - 2011-12-16 6PM 不定期更新中 | |
1 zgmlhx | |
2 gengdie | |
3 caoliu520 | |
4 taidaonet | |
5 dengbot | |
6 banyilin | |
7 pinggaozhi | |
8 jackbilldarren | |
9 mlhshhs |
This file contains hidden or 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
The Chrome Web Store is getting a new look! In the coming weeks, we’ll roll out a new version of the store that requires new images. If you want to provide images in the old sizes, as well, you can do so using the “current store look” tab. | |
Provide images that the store can use to promote your item. Although only the small box image is required, your item might be featured more prominently if you also provide a large box image, a marquee image, or both. | |
Fill the entire region, using square corners and no padding (full bleed). | |
Use a medium or dark background. | |
Avoid text in the image as much as possible. | |
Don’t put white elements along the edges of the image; the edges should be well defined. | |
Don't use a screenshot. | |
Your image should display well when reduced to half size. | |
Note: The size of promotional images in the current Chrome Web Store is different from the size in the new-look store. |
This file contains hidden or 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 | |
# ~/bin/chromium.sh | |
# 使用内存文件系统加速 chromium 运行 | |
# 启动前和关闭后同步文件 | |
CMD="chromium" | |
RAM_CACHE_DIR="/dev/shm/$USER-chrome-cache/" | |
DISK_CACHE_DIR="$HOME/.cache/chromium/" |
This file contains hidden or 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/python | |
# -*- coding: utf-8 -*- | |
# -*- Mode: python; c-basic-offset: 4 -*- | |
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: | |
'''Interactive Python Gir (Gtk3) Console | |
@author: Jiahua Huang <[email protected]> | |
@license: LGPLv3+ | |
''' |
This file contains hidden or 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 | |
get_chromium_snapshots(){ | |
# 获取 snapshots 版 chromium-browser | |
VERSION="`wget -O- -nv http://build.chromium.org/f/chromium/snapshots/chromium-linux-reliability/LATEST`" | |
URL="http://build.chromium.org/f/chromium/snapshots/chromium-linux-reliability/$VERSION/chrome-linux.zip" | |
## 考虑已经下载的情况 | |
touch VERSION | |
[ "`cat VERSION`" == $VERSION ] && return | |
## 下载 |
This file contains hidden or 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 | |
paveo(){ | |
REG="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" | |
CMD="" | |
for i in `sed -rn "/$REG/=" $1 ` | |
do | |
CMD="$CMD ; ${i}s/$REG/`uuid`/" | |
done | |
sed -r -i "$CMD" $1; |
This file contains hidden or 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
diff --git a/nautilus-3.2.0/src/nautilus-desktop-window.c b/nautilus-3.2.0/src/nautilus-desktop-window.c | |
--- a/nautilus-3.2.0/src/nautilus-desktop-window.c | |
+++ b/nautilus-3.2.0/src/nautilus-desktop-window.c | |
@@ -246,6 +246,11 @@ nautilus_desktop_window_constructed (GOb | |
g_signal_connect_swapped (nautilus_preferences, "changed::" NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, | |
G_CALLBACK (nautilus_desktop_window_update_directory), | |
window); | |
+ | |
+ GtkWidget * menubar_parent = gtk_widget_get_parent (NAUTILUS_WINDOW (window)->details->menubar); | |
+ GtkWidget * menubar_viewport = gtk_viewport_new (NULL, NULL); |