Skip to content

Instantly share code, notes, and snippets.

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit toolchain-funcs eutils perl-module distutils
DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
HOMEPAGE="http://sourceforge.jp/projects/nkf/"
--- powertop-ja.po.orig 2010-07-16 01:57:48.000000000 +0900
+++ powertop-ja.po 2010-08-19 07:54:24.204000002 +0900
@@ -82,7 +82,7 @@
#: ../devicepm.c:114
msgid " P - Enable Runtime PM"
-msgstr " T - ランタイムPM有効 "
+msgstr " P - ランタイムPM有効 "
#: ../devicepm.c:276
diff -uNr r8168-8.018.00/src/r8168_n.c r8168-8.018.00.new/src/r8168_n.c
--- r8168-8.018.00/src/r8168_n.c 2010-03-31 14:48:19.000000000 +0900
+++ r8168-8.018.00.new/src/r8168_n.c 2010-08-27 12:32:38.755822272 +0900
@@ -8916,20 +8916,25 @@
AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
AcceptAllPhys;
mc_filter[1] = mc_filter[0] = 0xffffffff;
- } else if ((dev->mc_count > multicast_filter_limit)
+ } else if ((netdev_mc_count(dev) > multicast_filter_limit)
|| (dev->flags & IFF_ALLMULTI)) {
@kjmkznr
kjmkznr / marvell_88SE9123_with_sil3726_workaround_libata-pmp.patch
Created November 22, 2010 07:26
Using Marvell 88SE9123 Chip with Sil3726 PMP Chip Workaround patch for gentoo-sources-2.6.36-r1
--- libata-pmp.c.orig 2010-11-22 04:34:38.000000000 +0900
+++ libata-pmp.c 2010-11-22 04:42:59.000000000 +0900
@@ -286,6 +286,8 @@
reason = "failed to write Sil3726 Private Register";
goto fail;
}
+ /* nr_ports decrement */
+ nr_ports--;
}
@kjmkznr
kjmkznr / always_https.js
Created December 3, 2010 00:23
always https
if (location.href.substring(0,5) == 'http:') {
console.log(location.href);
console.log(location.host);
console.log(location.pathname);
old_url = location.href.substring(7);
if (m = old_url.match("(www\.)?google\.com/search(.*)")) {
param = m[2];
window.location = "https://encrypted.google.com/search".concat(param);
} else if (m = old_url.match("(www\.)?google\.com/webhp(.*)")) {
param = m[2];
set termencoding=utf-8
set encoding=japan
set fileencodings=utf-8,iso-2022-jp,cp932,euc-jp
set fenc=utf-8
set enc=utf-8
diff -uNr ip6t_MAP66-0.5.orig//ip6t_MAP66.c ip6t_MAP66-0.5/ip6t_MAP66.c
--- ip6t_MAP66-0.5.orig//ip6t_MAP66.c 2010-10-16 13:52:42.000000000 +0900
+++ ip6t_MAP66-0.5/ip6t_MAP66.c 2011-02-11 00:13:01.355090007 +0900
@@ -135,7 +135,10 @@
if (NULL != dev) {
const struct inet6_ifaddr *ifa;
const struct inet6_dev *idev = rcu_dereference(dev->ip6_ptr);
- for (ifa = idev->addr_list; NULL != ifa; ifa = ifa->if_next) {
+ list_for_each_entry(ifa, &idev->addr_list, if_list) {
if (ipv6_addr_equal(&ifa->addr, addr)) return true;
@kjmkznr
kjmkznr / tp_peakshift.py
Created May 2, 2011 14:38
ThinkPad でピークシフト機能を使うスクリプト
#!/usr/bin/python
import sys
import os
import syslog
from datetime import datetime
import urllib
import json
def get_forecast(num=6):
params = urllib.urlencode({
#!/usr/bin/ruby
require 'rubygems'
require 'sinatra'
require 'omniauth'
require 'openid/store/filesystem'
require 'openid/fetchers'
OpenID.fetcher.ca_file = '/etc/ssl/certs/ca-certificates.crt'
use Rack::Session::Cookie