Skip to content

Instantly share code, notes, and snippets.

Minoru Mizutani mmizutani

  • Tokyo
View GitHub Profile
@mmizutani
mmizutani / yieldcurve.cpp
Created Oct 5, 2013
DemoVasicekDynamics
View yieldcurve.cpp
void DemoVasicekDynamics()
{
Real b=0.1; //long term rate
Real lambda = 0.0; //risk parameter
Real r0=0.05; //spot interest rate
Real a=0.1; //speed of mean reversion
Real sigma=0.01; //vol. parameter
std::vector<std::vector<double>> xAxisVecs,yAxisVecs;
std::vector<std::string> curveTitleVec;
View gist:8503811
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
View disruptor.scala
import com.lmax.disruptor.dsl.Disruptor
import java.util.concurrent.Executors
import com.lmax.disruptor._
case class ValueEvent(var value: Long)
case class ValueEventTranslator(value: Long) extends EventTranslator[ValueEvent] {
def translateTo(event: ValueEvent, sequence: Long) = {
event.value = value
event
@mmizutani
mmizutani / SassMeister-input.scss
Created Nov 2, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
//colors
$color_outer_space_approx: #24353c;
$white_80: rgba(255, 255, 255, 0.80);
$white_40: rgba(255,255,255,0.4);
$black_35: rgba(0,0,0,0.35);
View install_scala_sbt.sh
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
@mmizutani
mmizutani / install_oraclejdk8.sh
Last active Aug 29, 2015
Install Oracle Java SDK 8 on CentOS
View install_oraclejdk8.sh
#!/bin/bash
# First verify the version of Java being used is not Oracle JDK.
java -version
# Get the latest Oracle Java SDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
wget -c --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u31-b13/jdk-8u31-linux-x64.rpm" --output-document="jdk-8u31-linux-x64.rpm"
# Install Java SDK
sudo rpm -i jdk-8u31-linux-x64.rpm
View Brew Scala 2.10.4
Homebrew - Scala 2.10.4
Install Tapped version of Scala 2.10.4 (old version)
> brew install homebrew/versions/scala210
Unlink version of Scala 2.11 (if installed)
> brew unlink scala
Link Tapped version of Scala 2.10.4
> brew link scala210 --force
@mmizutani
mmizutani / private.xml
Last active Mar 1, 2018
Karabiner custom keyboard mappings for HHKB Professional 2 and Logitech K810 on Mac OSX
View private.xml
<!-- ~/Library/Application\ Support/Karabiner/private.xml -->
<!-- https://gist.github.com/mmizutani/83374181c712d4bb0978 -->
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>PFU</vendorname>
<vendorid>0x0853</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>HHKB_PRO_2</productname>
@mmizutani
mmizutani / NERDTree.mkd
Created Oct 25, 2015 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet
View NERDTree.mkd

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
@mmizutani
mmizutani / anti-excel-hoganshi.html
Created Jan 19, 2016 — forked from tatesuke/anti-excel-hoganshi.html
完全に単一のhtmlでmarkdown
View anti-excel-hoganshi.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Javaによる開発の流れ</title>
<script type="text/template" id="content1">
<!--==================================================================
↓ここからmarkdownを記述します
====================================================================-->
# Javaによる開発の流れ
You can’t perform that action at this time.