Skip to content

Instantly share code, notes, and snippets.

--- twissr.js.orig 2010-09-11 19:02:12.000000000 +0900
+++ twissr.js 2010-09-11 19:02:41.000000000 +0900
@@ -1,5 +1,5 @@
// Vimperator plugin: "Update Twitter & Wassr"
-// Last Change: 20-Oct-2008. Jan 2008
+// Last Change: 01-Sep-2010. Jan 2008
// License: Public domain
// Maintainer: mattn <[email protected]> - http://mattn.kaoriya.net/
@@ -7,7 +7,7 @@
--- index.fcgi.orig 2010-09-20 15:33:51.000000000 +0900
+++ index.fcgi 2010-09-20 21:11:20.000000000 +0900
@@ -8,6 +8,7 @@
# Copyright (C) 2006-2009, Kazuhiko <[email protected]>
# You can redistribute it and/or modify it under GPL2.
#
+require 'rubygems'
require 'fcgi'
FCGI.each_cgi do |cgi|
begin
--- functions.inc.php.orig 2010-10-09 20:33:20.000000000 +0900
+++ functions.inc.php 2010-10-09 22:16:43.000000000 +0900
@@ -1132,7 +1132,8 @@
$password = "";
$salt = "";
- if ($CONF['encrypt'] == 'md5crypt') {
+ if ( $CONF['encrypt'] == 'md5crypt' &&
+ ( stripos($pw_db, '$') === 0 || empty($pw_db) )) {
$split_salt = preg_split ('/\$/', $pw_db);
--- vpass2postfix.orig 2010-10-10 13:20:51.000000000 +0900
+++ vpass2postfix 2010-10-12 18:33:39.000000000 +0900
@@ -16,23 +16,36 @@
<?php
-if($argc < 2) {
- echo "Use $argv[0] vpasswd_file\n\n";
-} else {
+if ($argc < 3) {
#!/usr/bin/env python
# -*- coding: utf-8 -*-
print u"( ゚∀゚)o彡゜おっぱい!おっぱい!"
--- amazon_cross_book_check.user.js.orig 2010-06-16 15:59:19.000000000 +0900
+++ amazon_cross_book_check.user.js 2010-10-16 11:56:30.000000000 +0900
@@ -35,8 +35,9 @@
},
{
label: 'eBOOKOFF',
- url: 'http://www.ebookoff.co.jp/cmdtyallsearch/hdnAllSearchFlg/1/Ctgry/home/LRack/*/SetFlg/?Ctgry=home&LRack=*&hdnPage=0&hdnFormId=cmdtyalllist&hdnStartIndex=0&hdnEndIndex=500&actionNameTxt=&subtotal=&cat=&used=0&pg=0&pagingData=&iStartPageNo=1&nowPageNo=1&hdnCmdtyCode0=0010212095&word=',
- regexp: /uam texttype01">([\d,]+)/,
+ url: 'http://www.ebookoff.co.jp/cmdtyallsearch/hdnAllSearchFlg/1/Ctgry/1002/LRack/10/SetFlg/0?Ctgry=1002&LRack=10&SetFlg=&hdnContinueCmdtyList=&hdnContinueCode=&hdnPage=0&hdnFormId=cmdtyalllist&hdnStartIndex=0&hdnEndIndex=500&hdnNarrowCtgry=&hdnAllSearchFlg=&hdnNarrowFlg=&actionNameTxt=&subtotal=&cat=1002&word=',
+ afterISBN: '&used=0&author=&genre=&size=&pricef=&pricet=&issuef=&issuet=&maker=&isbn=&sort=&desc=&used=0&pg=0&pagingData=&iStartPageNo=1&nowPageNo=1&hdnCmdtyCode0=0010046487
@poppen
poppen / upgrade.php.patch
Created October 27, 2010 02:57
patch for upgara.php of postfixadmin-2.3.2
--- upgrade.php.orig 2010-10-27 11:56:13.000000000 +0900
+++ upgrade.php 2010-10-27 11:52:40.000000000 +0900
@@ -167,7 +167,7 @@
'{FULLTEXT}' => 'FULLTEXT',
'{BOOLEAN}' => 'tinyint(1) NOT NULL',
'{UTF-8}' => '/*!40100 CHARACTER SET utf8 */',
- '{LATIN1}' => '/*!40100 CHARACTER SET latin1 */',
+ '{LATIN1}' => '/*!40100 CHARACTER SET utf8 */',
'{IF_NOT_EXISTS}' => 'IF NOT EXISTS',
'{RENAME_COLUMN}' => 'CHANGE COLUMN',
#!/usr/bin/env perl
use strict;
use warnings;
use Digest::MD5 qw( md5_hex );
use feature qw( say );
my $secret = $ARGV[0];
my @argvs = split('&', $ARGV[1]);
#!/usr/bin/env perl
use strict;
use warnings;
use Digest::MD5 qw( md5_hex );
use feature qw( say );
my $uri = 'http://api.flickr.com/services/rest/?';
my $secret = $ARGV[0];
function jsonFlickrApi(data) {
var photos = [];
var randOrd = function() {
return (Math.round(Math.random()) - 0.5);
};
$.each(data.photoset.photo, function(i,p) {
var get_url = function(url) {
return url;
};