Skip to content

Instantly share code, notes, and snippets.

// ==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!');
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define MAX_NUM 999999999
typedef struct{
long double ax;
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAX_NUM 999999999
typedef struct{
double ax;
double ay;
pbpaste | perl -p -e 's/&/&amp;/g; s/</&lt;/g; s/>/&gt;/g; s/\"/&quot;/g'
@cocontusfine
cocontusfine / rione_hash.rb
Created December 19, 2008 12:18
undefined
# -*- coding: utf-8 -*-
h = Hash.new("UNIXコマンドを入れてください")
h["時間"]=`date`
h["カレンダー"]=`cal`
h["環境"]=`env`
h["ユーザー"]=`id`
h["ホストネーム"]=`host`
h.store("グループ",`group`)
@cocontusfine
cocontusfine / tri.rb
Created December 13, 2008 13:04
undefined
#! /usr/bin/ruby
# -*- coding: utf-8 -*-
class Position
def initialize(x,y)
@x = x
@y = y
end
def x
# オセロ用の石クラス
class Stone
def initialize(color)
@color = color
end
def color
@color
end