This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm; | |
import std.exception; | |
import std.stdio; | |
import std.range; | |
import std.traits; | |
import std.typecons; | |
class InvalidCharacerException : Exception { | |
this(string msg, string file = __FILE__, uint line = __LINE__) { | |
super(msg, file, line); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.typetuple; | |
version (unittest) { | |
enum Attr1; | |
enum Attr2; | |
struct Foo { | |
@Attr1 int x; | |
@Attr1 int y; | |
@Attr1 @Attr2 int z; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.bitmanip; | |
import std.conv; | |
import std.exception; | |
import std.range; | |
import std.stdio; | |
import std.traits; | |
struct PSDHeader { | |
char[4] signature; | |
ushort version_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto daysPerYaer(int year) { | |
if (year % 4 == 0 && !(year % 100 == 0 && year % 400 != 0)) { | |
return 366; | |
} else { | |
return 365; | |
} | |
} | |
unittest { | |
import std.algorithm; | |
import std.range; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.conv; | |
class CommutativeRing { | |
uint line; | |
CommutativeRing left, right; | |
CommutativeRing inverseOf; | |
string op; | |
this(uint line = __LINE__) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.traits; | |
import std.typecons; | |
private struct Curry(alias Func, size_t Index = 0) { | |
private alias _Types = ParameterTypeTuple!Func; | |
private Tuple!(_Types[0 .. Index]) _args; | |
static if (Index + 1 == _Types.length) { | |
ReturnType!Func opCall(_Types[Index] arg) { | |
return Func(_args.expand, arg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bindkey -v | |
setopt auto_cd | |
setopt auto_pushd | |
cpdpath=(~) | |
chpwd_functions=($chpwd_functions dir) | |
HISTFILE=~/.zsh_history | |
HISTSIZE=6000000 | |
SAVEHIST=6000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"NeoBundle Scripts----------------------------- | |
if has('vim_starting') | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=/Users/u_yamada/.vim/bundle/neobundle.vim/ | |
endif | |
" Required: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// InteRactive D console | |
module ird; | |
import std.algorithm; | |
import std.conv; | |
import std.file; | |
import std.process; | |
import std.range; | |
import std.stdio; | |
import std.string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var pandoc = require('gulp-pandoc'); | |
var webserver = require('gulp-webserver'); | |
gulp.task('html', function () { | |
gulp.src('src/*.md') | |
.pipe(pandoc({ | |
from: 'markdown', |
OlderNewer