This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#define MAX_NUM 999999999 | |
typedef struct{ | |
double ax; | |
double ay; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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) ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ~/.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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) |