Skip to content

Instantly share code, notes, and snippets.

Avatar

Michihito Shigemura shigemk2

View GitHub Profile
View mikutter-misakura.rb
# -*- coding: utf-8 -*-
def AheGaoDoublePeace(text)
str = text
str = str.gsub(/(気持|きも)ちいい/,'ぎも゛ぢい゛い゛ぃ')
str = str.gsub(/(大好|だいす)き/,'らいしゅきいぃっ')
str = str.gsub(/(ミルク|みるく|牛乳)/,'ちんぽミルク')
str = str.gsub(/お(願|ねが)い/,'お願いぃぃぃっっっ゙')
str = str.gsub(/ぁ/,'ぁぁ゛ぁ゛')
str = str.gsub(/あ/,'ぁあああ あぉ')
View 28-164209.scala
class A {
class B
def f(b: B) = println("Got my B!")
}
val a1 = new A
println(a1)
val a2 = new A
println(a2)
View 28-164209.scala
class A {
class B
def f(b: B) = println("Got my B!")
}
val a1 = new A
println(a1)
val a2 = new A
println(a2)
@shigemk2
shigemk2 / appopen
Created Mar 30, 2014
Mac専用 open script
View appopen
#! /bin/sh
function usage() {
echo "Usage : ${0} [option]"
echo ""
echo " アプリケーション実行ショートカット"
echo "e emacs"
echo "a activity monitor"
echo "g google chrome"
echo ""
View hello15.js
var http = require('http');
var fs = require('fs');
var url = require('url');
var qs = require('querystring');
var jade = require('jade');
var index = fs.readFileSync('./index.jade', 'utf8');
var style = fs.readFileSync('./style.css', 'utf8');
var datas = [];
View hello13.js
var http = require('http');
var fs = require('fs');
var url = require('url');
var qs = require('querystring');
var jade = require('jade');
var index = fs.readFileSync('./index.jade', 'utf8');
var style = fs.readFileSync('./style.css', 'utf8');
var server = http.createServer();
View index.jade
doctype
html
head
meta(charset="utf-8")
title サンプル
link(rel="stylesheet" href="style.css")
body
h1= title
p= msg + '(' + form.myname + ',' + form.mail + ',' + form.age + ')'
form(method='post' ,action='/')
View 11-1-201406092359.fsx
let aout = System.IO.File.ReadAllBytes "regs.out"
let read16 (a:byte[]) b =
(int a.[b]) ||| ((int a.[b + 1]) <<< 8)
let tsize = read16 aout 2
let dsize = read16 aout 4
let mem = Array.zeroCreate<byte> 0x10000
mem.[0 .. tsize + dsize - 1] <- aout.[16 .. 16 + tsize + dsize - 1]
let mutable ip = 0
let show len dis =
let bin = [ for b in mem.[ip .. ip + len - 1] -> sprintf "%02x" b ]
View layout-201406100824.jade
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
body
block content
View fizzbuzz-20140612.js
// 引数なし例外
var ArgumentNullException = function () { };
// FizzBuzz用クラス定義
var FizzBuzz = (function () {
// FizzBuzzクラス作成
var FizzBuzz = function () { };
// 指定した値に対応するFizzBuzz結果を返すメソッド
FizzBuzz.prototype.speak = function (n) {