git config --global user.name "あなたの名前"
git config --global user.email メールアドレス
git config --global color.ui auto
git config --global core.autocrlf input
'use strict' | |
let socket = io.connect(), | |
input_message = $('#input_message'); | |
socket.on('connect', function() { | |
add_message('connect success'); | |
}); | |
socket.on('chat_message', function(message) { | |
add_message(message); |
# -*- coding: utf-8 -*- | |
import re | |
import random | |
class Dice(object): | |
def __init__(self, description): | |
self._description = description | |
match = re.search('(\d+)d(\d+)', description) | |
if not match: raise Exception('Dice format error: %s' % description) | |
self._number = int(match.group(1)) |
import sys | |
import pygame | |
pygame.init() | |
screen = pygame.display.set_mode((680, 480), 0, 8) | |
pygame.display.update() | |
clock = pygame.time.Clock() | |
while(True): | |
for event in pygame.event.get(): | |
if event.type is pygame.QUIT: sys.exit(0) |
# -*- encoding: shift-jis -*- | |
import sys | |
import os | |
from PySide import QtCore | |
from PySide import QtGui | |
from replace import MultiReplace | |
class MainWindow(QtGui.QDialog): | |
def __init__(self, parent=None): | |
super(MainWindow, self).__init__(parent) |
[[plugins]] | |
repo = 'Shougo/dein.vim' | |
[[plugins]] | |
repo = 'simeji/winresizer' | |
hook_add = ''' | |
let g:winresizer_start_key = '<C-R>' | |
''' | |
[[plugins]] |
import macros | |
proc typeName(head: NimNode): NimNode = | |
if head.len == 0: head else: head[1] | |
proc baseName(head: NimNode): NimNode = | |
if head.len == 0: newIdentNode("RootObj") else: head[2] | |
proc isObjectDef(head: NimNode): bool = | |
head.len == 0 or head[2].kind == nnkIdent |
proc command_pattern() = | |
var commands: seq[proc()] | |
commands.insert(proc() = echo "hello") | |
commands.insert(proc() = echo "world") | |
for c in commands: c() |
type Range = ref object of RootObj | |
min: int | |
max: int | |
iterator items(r: Range): int = | |
for n in r.min..r.max: | |
yield n | |
proc iterator_obj() = | |
for n in Range(min:3, max:12): |