Skip to content

Instantly share code, notes, and snippets.

View suisho's full-sized avatar
🚫
Deprecated

Old account suisho

🚫
Deprecated
View GitHub Profile
class C {
def call(num:Int):Unit = {
}
}
class X {
type Hoge = { def call(num:Int):Unit;}
def exe(hoge:Hoge, num:Int) = {
hoge.call(num)
}
#!/bin/bash
# This is the current stable release to default to, with Omnibus patch level (e.g. 10.12.0-1)
# Note that the chef template downloads 'x.y.z' not 'x.y.z-r' which should be a duplicate of the latest -r
use_shell=0
prerelease="false"
# Check whether a command exists - returns 0 if it does, 1 if it does not
exists() {
@suisho
suisho / chromerty.js
Created May 20, 2013 14:10
node-chromeを縮小したサンプル書きかけ
var defaultPath = function(){
}
var spawn = require('child_process').spawn;
var http = require('http');
var url = require('url');
var fs = require('fs');
var path = require('path');
package main
import (
"fmt"
"math"
)
func newton(x, z float64) float64{
@suisho
suisho / zaraki.coffee
Created March 7, 2013 11:27
hubotに即死魔法をかける
module.exports = (robot) ->
robot.respond /ザラキ/ ,(msg)->
msg.send robot.name+" は しんでしまった"
process.nextTick () ->
throw new Error "!!! Thwack !!!"
var async = require('async');
var util = require("util")
// execute multi query
module.exports = function(connection, queries, options, cb){
if(typeof options === "function") cb = options, options = {};
if(!options) options = {};
if(typeof queries == "string"){
queries = [queries];
}
module.exports = function(){
//without space line or semicolon
}
// some comment
IrcBot = require 'hubot-irc'
module.exports = (robot) ->
dummy = IrcBot.use(robot)
if(robot.adapter.constructor is not dummy.constructor)
return
robot.enter () ->
bot = robot.adapter.bot
bot.say = (target, str) ->
this.notice(target, str)
@suisho
suisho / index.js
Created February 24, 2013 06:58
wgetもどき的なもの
var path = require("path")
var cheerio = require('cheerio')
var request = require("request")
var fs = require("fs")
var mkdirp = require("mkdirp")
require('events').EventEmitter; // TODO:イベントハンドリングするにはこれだったけど。
module.exports = function(url, options){
var getBaseUrl = function(url){
var urlObj = require('url').parse(url);
return urlObj.protocol+"//"+urlObj.host;
@suisho
suisho / Default.sublime-keymap
Created February 24, 2013 05:50
[sublime text] unbind tab key
[
{ "keys": ["tab"], "command": "NULL" } ,
{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{ "keys": ["tab"], "command": "reindent", "context":