Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

omochimetaru omochi

🏠
Working from home
  • japan
  • tokyo
Block or report user

Report or block omochi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View omochi-server.md

このページについて

私が運営しているマインクラフトサーバのアナウンスページです。 ユーザの方々への連絡に使用しています。 更新情報については、 ページ左のRevisionsからdiffを参照してください。

サーバ

URL

View Vector2.ts
import Vector3 = require("./Vector3");
class Vector2 {
constructor(public x: number, public y: number){
}
toVector3(z: number): Vector3{
return new Vector3(this.x, this.y, z);
}
}
export = Vector2;
View FsAsync.ts
class FsAsync {
static readFile: (filename: string, encoding: string) => Promise<string>;
private static _init() {
FsAsync.readFile = <any>Promise.promisify(fs.readFile);
}
private static __init = FsAsync._init();
}
View node-send-patch-memo
SendStream.prototype.stream = function(path, options){
// TODO: this is all lame, refactor meeee
var finished = false;
var self = this;
var res = this.res;
var req = this.req;
console.log("SendStream [" + path + "] stream, res.socket [" +res.socket+"]");
// pipe
View こんなかんじ
[omochi@omochi-macmini2 work]$ bsr checkout
connecting... : /Users/omochi/Dropbox/project/binstore/test01/repo
connected
fetch file list: current = 1
fetch file list: focus = latest
current: 1, focus: 2
compute plan
diff num: 14
! mod x del: .DS_Store: 6148 bytes => repo: 6148 bytes
--- x new: 01.png: 6184 bytes
View autojson_memo1.json.txt
{
// <T> Box
"Box": {
"type": "Let",
"params": ["value"],
"body": {
"type": "Class",
"fields": {
"value": "value"
}
View autojson_decoded.txt
SourceFile(
types={
Box=ClassDef(
let=[value]
name=null
fields=[
Field(
value=Ref(name=value)
)
]
View autojson_1.txt
ソース
{
"types": {
"A": {
"type": "Class",
"fields": {
"intB": {
"type": "Apply",
"target": "B",
View autojson_2015-08-08.txt
ソース
{
"types": {
"Box": {
"type": "Class",
"let": ["T"],
"fields": {
"value": "T"
}
@omochi
omochi / perm_recur.c
Created Dec 6, 2012
順列列挙でステップごとのメモリ確保無しでできると教わったのでやってみた
View perm_recur.c
//$ gcc -std=m9 perm.c
#include<stdio.h>
#include<stdlib.h>
void swap_int(int *a,int *b){
int t = *a;
*a = *b;
*b = t;
}
void print_int_array(int array[],int num){
printf("[ ");
You can’t perform that action at this time.