Skip to content

Instantly share code, notes, and snippets.

View smellman's full-sized avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
@smellman
smellman / dom_inspector_with_persona.diff
Created February 20, 2011 16:41
DOM Inspector support personas
diff --git a/chrome/content/inspector/inspector.xml b/chrome/content/inspector/inspector.xml
index 1504132..241fdd4 100644
--- a/chrome/content/inspector/inspector.xml
+++ b/chrome/content/inspector/inspector.xml
@@ -891,4 +891,23 @@
</binding>
+ <binding id="root-element">
+ <implementation>
@smellman
smellman / ushahidi_allemail_change.sql
Created March 20, 2011 05:41
全てのユーザのメアドを一気に変更する。
update users set email = concat(concat('btm+', id), '@smellman.org');
update incident_person set person_email = concat(concat('btm+', id), '@smellman.org');
update comment set comment_email = concat(concat('btm+', id), '@smellman.org');
update alert set alert_recipient = concat(concat('btm+', id), '@smellman.org');
@smellman
smellman / email.php
Created March 20, 2011 09:16
application/config/email.php : ushahidiでgmailからメール送信できるようにする
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* SwiftMailer driver, used with the email helper.
*
* @see http://www.swiftmailer.org/wikidocs/v3/connections/nativemail
* @see http://www.swiftmailer.org/wikidocs/v3/connections/sendmail
* @see http://www.swiftmailer.org/wikidocs/v3/connections/smtp
*
* Valid drivers are: native, sendmail, smtp
*/
@smellman
smellman / sinsai_bug181.txt
Created March 20, 2011 09:30
bug181の修正アイデア
■修正前のメール
アラートを受けとるための確認は、こちらにアクセスしてください。http://192.168.1.119/ushahidi/index.php/alerts/verify/?c=agzV5ea1wTJO1gd3ezUi&e=btm@smellman.org
■修正後のメール
アラートを受けとるための確認は、こちらにアクセスしてください。
http://192.168.1.119/ushahidi/index.php/alerts/verify/?c=agzV5ea1wTJO1gd3ezUi&e=btm@smellman.org
もしくは、以下の承認コードを確認画面で登録してください。
agzV5ea1wTJO1gd3ezUi
jQuery(document).ready(function(){
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(p){
var lonlat = new OpenLayers.LonLat(p.coords.longitude,p.coords.latitude).transform(proj_4326, map.getProjectionObject());
map.setCenter(lonlat, 10);
});
}
});
@smellman
smellman / htaccess.diff
Created March 21, 2011 11:32
sinsai.info #208の修正点...
diff --git .htaccess .htaccess
index d4821fc..a618363 100755
--- .htaccess
+++ .htaccess
@@ -6,6 +6,8 @@
# Installation directory
RewriteBase /ushahidi
+ RewriteRule ^.*/media/(.*) media/$1 [L,R]
+
@smellman
smellman / gist:888105
Created March 26, 2011 07:37
smellman の public key
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4d8EuONtbrTMDWAXcVQ/Tr7ezOpnRNqo6D4hFSkyJDLHicITev0c7roR1/DWZ90gF1834tFAFggr9QlZ7ppEXzidSXfm1q7iS2UTKKQyoPNBNMKNfK+Jl+Nij0XTEfTNzNjGRxhtkAh9VU7d+rBO/9xfEoRxxgoGMQuX3G7Ym5LBP53rKan+51nFSWNwmqIV8Ktm5iK4AO77HKmMY20TGzeZ2LWepchqBKjGMFxKzuFKXd3zELv5cPhUOSIjMiGwe3kZzz4srvGrhaJhcHqTs8FTVqqpRR51D7OfMIL+N6NC3VR6XspMInHawk07NRoGpt5Eql3U43O2cKSQ3LxW/w== btm@wisp.local
@smellman
smellman / gist:913133
Created April 11, 2011 06:21
opensslを使うやつ
this document user name is 'kbmj', replace your account.
1. create openssl project
$ sudo mkdir -p /opt/smartphone/lib
$ sudo chown -R kbmj:staff /opt/smartphone
$ cd /opt/smartphone/lib
$ git clone git://github.com/smellman/openssl-xcode.git
$ curl -O ftp://ftp.infoscience.co.jp/pub/Crypto/SSL/openssl/source/openssl-1.0.0a.tar.gz
$ tar zxf openssl-1.0.0a.tar.gz
$ cp -fr openssl-xcode/openssl.xcodeproj openssl-1.0.0a/
@smellman
smellman / patch_for_config_mk_to_icu.diff
Created November 20, 2011 23:48
LuakitをMacOSXでビルドするためのパッチ
diff --git config.mk config.mk
index 8b453ec..d69b687 100644
--- config.mk
+++ config.mk
@@ -46,7 +46,7 @@ have lua >= 5.1 installed)
endif
# Packages required to build luakit
-PKGS := gtk+-2.0 gthread-2.0 webkit-1.0 javascriptcoregtk-1.0 sqlite3 $(LUA_PKG_NAME)
+PKGS := icu-i18n gtk+-2.0 gthread-2.0 webkit-1.0 javascriptcoregtk-1.0 sqlite3 $(LUA_PKG_NAME)
@smellman
smellman / pants.rb
Created December 6, 2011 04:42
お姉ちゃん達にパンツの色を聞いてみる
# coding: utf-8
class Cパンツ
def initialize(好み = {})
@色 = 好み[:色] || 0xFFFFFF
@柄 = 好み[:柄] || :無地
end
def 何色?
sprintf("%#x", @色)