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 Hello World | |
// @namespace http://diveintomark.org/projects/greasemonkey/ | |
// @description example script to alert "Hello world!" on every page | |
// @include http://www.google.co.jp/* | |
// ==/UserScript== | |
alert('Hello world!'); |
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> | |
#include <time.h> | |
#define MAX_NUM 999999999 | |
typedef struct{ | |
long double ax; |
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
pbpaste | perl -p -e 's/&/&/g; s/</</g; s/>/>/g; s/\"/"/g' |
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
# -*- coding: utf-8 -*- | |
h = Hash.new("UNIXコマンドを入れてください") | |
h["時間"]=`date` | |
h["カレンダー"]=`cal` | |
h["環境"]=`env` | |
h["ユーザー"]=`id` | |
h["ホストネーム"]=`host` | |
h.store("グループ",`group`) | |
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
#! /usr/bin/ruby | |
# -*- coding: utf-8 -*- | |
class Position | |
def initialize(x,y) | |
@x = x | |
@y = y | |
end | |
def x |
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
# オセロ用の石クラス | |
class Stone | |
def initialize(color) | |
@color = color | |
end | |
def color | |
@color | |
end | |