Skip to content

Instantly share code, notes, and snippets.

View masahitojp's full-sized avatar
🎯
Focusing

Masato Nakamura masahitojp

🎯
Focusing
View GitHub Profile
@masahitojp
masahitojp / fabfile.py
Last active August 29, 2015 13:56
オープンファイル数を変更するfabricスクリプト
from fabric.contrib import files
__author__ = "@Masahito"
__license__ = "MIT"
# nofileをupdate
#
# example)
# fab -H localhost update_nofile
def update_nofile():
let range s e =
let rec loop r x =
if x > s then loop (x :: r) (x - 1)
else r in loop [] e;;
let ismultiple x =
if x mod 3 = 0 || x mod 5 = 0 then x else 0 in
let sum (l : int list) : int =
List.fold_left (fun acc x -> acc + x) 0 l in
let rec range a b =
if a > b then []
else a :: range (succ a) b
;;
(*
filter that corresponding to the tail recursion optimization.
standard List.filer isn't tailrec.
*)
let rec tailrec_filter p = function
@masahitojp
masahitojp / yappari.coffee
Created March 27, 2014 05:57
hubot-sample
module.exports = (robot) ->
robot.hear /やっぱり/, (msg) ->
msg.send "猫が好き"

lesson

  • VirtualBox
  • pLatex
  • Windows8.1
  • IEのsecurity設定
  • Google Docs
  • Linux Commands
#pragma once
// C++では、内部の関数名が異なるので、C言語として認識させる。
// 内部の関数名が異なる理由は
// C++のポリモフィズムにより、関数名@識別子を別途付けるため
#ifdef __cplusplus
extern "C" {
#endif
http://d.hatena.ne.jp/hiroi10/20130123/1358959412
https://github.com/dropbox/pyston/blob/master/docs/INSTALLING
# add
sudo apt-get install git
sudo apt-get install ccache
cd ~/
git clone https://github.com/dropbox/pyston.git
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.masahito</groupId>
<artifactId>scala_maven</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
pyconsgれぽーと
LTしてきたことをまとめる
5w1h
経緯
PyconAPACに遊びに意向と思ったけどチケット売り切れで参加できなかった
PyconSGに行く人がいるらしいとのことで、混ぜてもらうことに