Skip to content

Instantly share code, notes, and snippets.

@hitode909
hitode909 / pi.c
Created February 20, 2009 08:20 — forked from cocontusfine/pi.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_NUM 999999999
typedef struct{
double ax;
double ay;
// ==UserScript==
// @name remove_hatena_header
// @namespace http://d.hatena.ne.jp/hitode909/
// @description remove hatena's header.
// @include *.hatena.ne.jp/*
// ==/UserScript==
var banner = document.getElementById('banner');
if (banner)
{
// ==UserScript==
// @name coconutsfine
// @namespace http://d.hatena.ne.jp/coconutsfine/
// @description visit my page!!!
// @include *
// ==/UserScript==
var mypage = 'http://d.hatena.ne.jp/coconutsfine/'
if(window.location.href.match(mypage) ){
;; ~/.emacs.d/site-lisp/以下をload-pathに追加
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(let* ((my-lisp-dir "~/.emacs.d/site-lisp/")
(default-directory my-lisp-dir))
(setq load-path (cons my-lisp-dir load-path))
(normal-top-level-add-subdirs-to-load-path)))
;; localな設定ファイルがあるときロードする
(if (file-exists-p "~/.emacs.el.local")
// ==UserScript==
// @name replaceimage
// @namespace http://d.hatena.ne.jp/hitode909/
// @description replace all images.
// @include *
// ==/UserScript==
while(e = document.images[0]){
e.parentNode.insertBefore(newsvg(e), e)
e.parentNode.removeChild(e);
// ==UserScript==
// @name RitsOnlineSyllabusShortTitle
// @namespace http://d.hatena.ne.jp/hitode909
// @description make online syllabus shorter.
// @include http://online-kaikou.ritsumei.ac.jp/*
// ==/UserScript==
function xpath(query) {
return document.evaluate(query, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
}
#!/bin/sh
# setup cmigemo and migemo.el
# see http://matsuesns.jp/blog/blog.php?key=2778
cd $TMPDIR
wget http://www.kaoriya.net/dist/cmigemo-1.2.tar.bz2
tar jxvf cmigemo-1.2.tar.bz2
cd cmigemo-1.2
./configure
@hitode909
hitode909 / zozoresort_append_anchor.user.js
Created June 14, 2009 11:00
Append anchor tag to ZOZORESORT search result.
// ==UserScript==
// @name ZOZORESORT Append Anchor
// @namespace http://www.hatena.ne.jp/hitode909/
// @description Append anchor tag to ZOZORESORT search result.
// @include http://zozo.jp/*
// ==/UserScript==
(function () {
function append (doc) {
var items = doc.getElementsByClassName('image');
for (var i=0; i<items.length; i++) {
// ==UserScript==
// @name simple twitter
// @namespace http://www.hatena.ne.jp/hitode909/
// @description make posts simple.
// @include http://twitter.com/*
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
(function(){
$('li.status').each(function(){
object FizzBuzz {
def fizzbuzz(i:Int) = (i%3==0, i%5==0) match {
case (true,true) => "Fizz Buzz"
case (true,false) => "Fizz"
case (false,true) => "Buzz"
case (false,false) => i
}
def main(args: Array[String]) {
println((1 to 30).map(i => fizzbuzz(i)))