Oct 10

Dimensions 2 Folders 可以基于图片的分辨率来组织图片,将相同分辨率或者自定义分辨率的图片放入各自的目录中,在某些情况下非常实用。

主要特点:

递归扫描,可以扫描子目录;
自定义目录分隔符, 例如: 800x600, 800 x 600, 800X600, 800$600 等;
三种排序组织方式.

下载可以去官方站点,有免安装版本。


Sep 25

Google 提供了一个获取站点 favicon 的服务:

http://www.google.com/s2/favicons?domain=

但是天朝,Google 不稳定,所以需要把这些站点图标缓存到本地,以下:


//从URL中提取域名函数
function get_domain($url) {
/*
Author : Ayush
URL : http://Webgarb.com
*/
    $url = explode('/', str_replace('www.', '', str_replace('http://', '', $url)));
    return $url[0];
}

function getFavicon($var){
    $cache_days = 30; //图标缓存多少天
    $linkdomain = get_domain($var);
    $favicon_cache_dir = ABSPATH.'wp-content'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'favicon_cache';
    $favicon_url = 'https://www.quakemachinex.com/blog/wp-content/plugins/favicon_cache/'.$linkdomain.'.png';
    $fp = fopen ($favicon_cache_dir.'/'.$linkdomain.'.png', 'r');
    $favicon_create_time = filectime($favicon_cache_dir.'/'.$linkdomain.'.png');
    $time_now = date("Y-m-d H:i:s");
    $favicon_stay_days = (strtotime($time_now)-strtotime(date("Y-m-d H:i:s",$favicon_create_time)))/86400;
    $favicon_stay_days = floor($favicon_stay_days);

    if ($fp && $favicon_stay_days < $cache_days) {
        return $favicon_url;
     } else {
        $remote_favicon = file_get_contents('http://www.google.com/s2/favicons?domain='.$linkdomain);
        $local_favicon = $favicon_cache_dir.'/'.$linkdomain.'.png';
        $local_favicon_actual = fopen($local_favicon, 'w+');
	fwrite($local_favicon_actual, $remote_favicon);
	fclose($local_favicon_actual);
        return $favicon_url;
     }

}

把这个函数引用到友情链接或者 BlogRoll 都行,可以参见本站效果。


Sep 09

PowerAMP

PowerAMP 堪称 Android 系统中用户体验最佳的音乐播放器,支持 Android 2.0 以上 ROM,界面美观,音质出众。

软件特性:

- 支持MP3、MP4/M4A、无损ALAC、FLAC、OGG、WAV、TTA、WMA格式

- 使用自建解码器

- 窗口小部件

- 从SD卡中选择音乐

- ID3标签、歌词

- 内置两款精美的皮肤

- 快速扫描文件(每秒约1000个文件)

- 均衡器(EQ)设置

压缩包中 PAUnlocker.apk 为激活程序。这个激活程序不是国内那些什么 XX 网站放出来的又要重置又要断网还不时反弹的那些,激活很简单而且不反弹。唯一的要求就是你的系统要 Root 过。

PowerAMP_Unlocker


Sep 07

最好用的视频解码器之一了,不多介绍。3.0 支持 10bit 输出了!

本次提供 3.0 最终版和序列号。

Whats New in this Release





Aug 28

Unbound 是一款免费的相当轻量的 DNS 本地服务器软件,以前曾经做过介绍 Config Unbound On Windows

经过测试,原来只要改一下 Unbound 的配置文件,也可以把它当 PWX-DNS-Proxy 用!

方法很简单,安装完 Unbound 后,打开安装目录下的 service.conf 文件,修改(添加)以下两行内容:(注意,此方法只适用于 Unbound 1.4.12 及其以下版本,新版的官方给出了直接参数支持的方法,详见文末

# Enable UDP, "yes" or "no".
do-udp: no

# Enable TCP, "yes" or "no".
do-tcp: yes

这样就强制 Unbound 只监听 TCP 的 53 端口了。

优点: Unbound 是一款专业的 DNS 服务器软件,标准功能和稳定性比 PWX-DNS-Proxy 强,查询速度较快,内存占用也比 PWX-DNS-Proxy 少;

缺点: 没有 PWX-DNS-Proxy 那样可以自定义某些网站使用特定的 DNS 服务器功能,而且由于关闭了 UDP 端口监听,nslookup 命令使用默认格式不能查询域名了,必须加 -vc 参数。

更新:在 forward-zone 中可以设置怎样的域名用哪个服务器查询,类似:

# forward-zone:
# name: "."
# forward-addr: 8.8.4.4
# forward-addr: 192.168.2.1@5355 # forward to port 5355.
# forward-zone:
# name: "cn"
# forward-host: 202.96.134.133

顺便说下,路由器是 Tomato,DD-WRT 那样使用 DNSMasq 的,可以把 Unbound 或者 PWX-DNS-Proxy 的查询服务器设置为路由器 IP,利用 DNSMasq 来进行更加灵活的配置。

2011-09-19 更新,新版的 Unbound 1.4.13 应该如此配置 DNS-Over-TCP:

# if yes, perform prefetching of almost expired message cache entries.
prefetch: yes

# Enable IPv4, "yes" or "no".
do-ip4: yes

# Enable IPv6, "yes" or "no".
do-ip6: no

# Enable UDP, "yes" or "no".
do-udp: yes

# Enable TCP, "yes" or "no".
do-tcp: yes

# upstream connections use TCP only (and no UDP), "yes" or "no"
# useful for tunneling scenarios, default no.
tcp-upstream: yes

注意 do-udp 一定要是 yes,但是实际上游查询会使用 tcp;还有一个切记先用 -vc 的 nslookup 确定你的上游 DNS 服务器支持 TCP 查询,国内的貌似全关了 :mrgreen:

Unbound 1.4.13 下载


[23/59]  «< 18 19 20 21 22 23 24 25 26 27 > ... »