Skip to content

Instantly share code, notes, and snippets.

@honda0510
honda0510 / gist:854188
Created March 4, 2011 04:54
お気に入りのFirefoxアドオン
KeySnail
Copy Fixer
FireGestures
IE Tab 2
@honda0510
honda0510 / gist:865497
Created March 11, 2011 05:38
PHPメモ
// 全ての定義済の変数を表示する
exit( var_dump( get_defined_vars() ) );
// 全ての定義済みの定数の名前と値を表示する
exit( var_dump( get_defined_constants(true) ) );
// スーパーグローバル変数を表示する
phpinfo(INFO_VARIABLES);
@honda0510
honda0510 / gist:974035
Created May 16, 2011 07:21
gedit プラグイン
Advanced Editing
http://live.gnome.org/Gedit/AdvancedEditingPlugin
Edit Shortcuts
http://empty.23inch.de/pmwiki.php/Main/EditShortcuts
Regex Search and Replace
TabSwitch
@honda0510
honda0510 / gist:1008613
Created June 5, 2011 03:23
Linux コマンド
ファイル内検索
grep -R -n foo .
ファイル名検索
find -type f -name *bar*
@yu-tang
yu-tang / vanillaforums-ja_Garden
Created June 21, 2011 08:47
vanillaforums-ja の Garden リポジトリ作成手順
vanillaforums-ja の Garden リポジトリ作成手順
===============
以下、基本的には Windows 版の Git Bash 上での操作を前提とします。
`git push` の対象を現在のブランチのみに限定するため、以下の設定を行っておくことを推奨します。
git config --global push.default tracking
参考:[見えないチカラ: 【翻訳】あなたの知らないGit Tips](http://keijinsonyaban.blogspot.com/2010/11/git-tips.html "見えないチカラ: 【翻訳】あなたの知らないGit Tips")
@honda0510
honda0510 / Module1.bas
Created October 10, 2011 06:50
【Windows スクリプト コンポーネント】Utilクラス
Option Explicit
Const UTIL_URL = "https://raw.github.com/gist/1274775/Util.wsc"
'Const UTIL_URL = "C:\work\Util.wsc"
Sub test1()
Dim Util As Object
Dim list As Variant
list = Array("もみじ", "あかね", "きんむぎ")
@honda0510
honda0510 / DOCTYPE.html
Created November 10, 2011 02:19
DOCTYPE宣言といくつかのタグ
HTML 4.01 Strict DTD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
HTML 4.01 Transitional DTD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
@honda0510
honda0510 / bookmarklet.js
Created March 1, 2012 05:50
Googleリーダーのアイテムをサイト別に表示するブックマークレット
javascript:(function(){var%20entries=document.getElementById('entries').querySelectorAll('.entry');var%20sites={};for(var%20i=0,n=entries.length;i%20%3C%20n;i++){var%20entry=entries[i];var%20site=entry.querySelector('.entry-source-title').innerHTML;var%20title=entry.querySelector('.entry-title').innerHTML;var%20url=entry.querySelector('.entry-original').href;var%20date=entry.querySelector('.entry-date').innerHTML;if(!sites[site]){sites[site]=[];}sites[site].push({title:title,url:url,date:date});}var%20dl=document.createElement('dl');for(var%20site%20in%20sites){var%20entries=sites[site];var%20table=document.createElement('table');for(var%20i=0,n=entries.length;i%20%3C%20n;i++){var%20entry=entries[i];var%20tr=document.createElement('tr');var%20span=document.createElement('span');span.innerHTML=entry.date;var%20td=document.createElement('td');td.setAttribute('style','width:100px;');td.appendChild(span);tr.appendChild(td);var%20a=document.createElement('a');a.href=entry.url;a.target=%22_blank%22;a.innerHTML=entr
@haiiro-shimeji
haiiro-shimeji / gist:4450006
Last active December 10, 2015 14:49
last' でした^^;;;
last' :: [a] -> a
last' (x:[]) = x
last' (x:xs) = last' xs
@haiiro-shimeji
haiiro-shimeji / gist:4450230
Last active December 10, 2015 14:48
素数判定(試し割り)
isPrime :: Int -> Bool
isPrime 1 = False
-- 約数リストを作成し、それが1,xのみである(それ以外の約数リストがnull)かどうかを判定して返却
--
-- lazy evaluation(怠惰な評価)で、最初の約数がリストに入れられた時点で
-- null評価されFalseを返すことを期待しているが、そうなのか?
--
isPrime x = null [f| f<-[2..x-1], 0 == mod x f]