Skip to content

Instantly share code, notes, and snippets.

Yuki Ito mururu

Block or report user

Report or block mururu

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 3.53.scm
(load "./stream.scm")
(define (average x y) (/ (+ x y) 2))
(define (sqrt-improve guess x)
(average guess (/ x guess)))
(define (sqrt-stream x)
(define guesses
@mururu
mururu / example.md
Last active Dec 24, 2015
sigil for erlang-mruby
View example.md
iex(1)> import SigilMruby
nil
iex(2)> %m( [1,2,3].map do |i|         
...(2)>   i + 1                        
...(2)> end) |> Enum.each(&IO.inspect/1)
2
3
4
:ok
@mururu
mururu / elixir.md
Last active Aug 31, 2016
Elixir で WebApp の開発に必要な N 個のこと
View elixir.md

Elixir で WebApp の開発に必要な N 個のこと

あるプログラミング言語で実際にWebAppを開発できるようになるまで、何が必要だろうか。言語仕様の習得は終えているとしよう。おそらく、最低限以下のような知識が必要だと思われる。とりあえずElixirについて知っていることを書いた。

パッケージマネージャー

標準添付です。

clojureのleiningenに強い影響を受けてる。らしい。

@mururu
mururu / 0-My-SICP-Template-README.md
Last active Dec 16, 2015
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
View 0-My-SICP-Template-README.md

Usage

$ git clone https://gist.github.com/5480012.git chapter1
$ cd chapter1

# create new file
$ make new TARGET=q1
$ ls
0-My-SICP-Template-README.md Makefile README.md q1.scm template.scm utils.scm
@mururu
mururu / 0415.scm
Last active Dec 16, 2015
sicp 0422
View 0415.scm
(define false #f)
(define true #t)
(define (p a)
(print a))
(define (pb a)
(print a)
(print ""))
View 0415.scm
(define false #f)
(define true #t)
(define (p a)
(print a))
(define (pb a)
(print a)
(print ""))
@mururu
mururu / git-alive
Created Dec 12, 2012
Git custom command to check GitHub system status
View git-alive
#!/bin/sh
curl -s https://status.github.com/api/messages.json | \
ruby -rjson -rtime -e \
'JSON.parse(STDIN.gets).each{|s|c = {"good"=>"\e[32m", "minor"=>"\e[33m"}[s["status"]] || "\e[31m"; puts %{#{Time.parse(s["created_on"]).localtime}: #{c}#{s["body"].gsub("\n", " ")}\e[0m}}'
@mururu
mururu / elixir-build.rb
Created Nov 13, 2012
elixir-build exenv formula
View elixir-build.rb
require 'formula'
class ElixirBuild < Formula
homepage 'https://github.com/mururu/elixir-build'
url 'https://github.com/mururu/elixir-build/tarball/v20121112'
sha1 '6d3ae172359e26ee94370ce309edad79c996ea78'
head 'https://github.com/mururu/elixir-build.git'
option "without-exenv", "Don't install as an exenv plugin"
@mururu
mururu / exenv.rb
Created Nov 13, 2012
exenv homebrew formula
View exenv.rb
require 'formula'
class Exenv < Formula
homepage 'https://github.com/mururu/exenv'
url 'https://github.com/mururu/exenv/tarball/v0.1.0'
sha1 '8254e6351c9c5614aaa79923b152671d3585a188'
def install
prefix.install Dir['*']
@mururu
mururu / add_up.rb
Created May 5, 2012
配列の各要素数をカウントするやつ
View add_up.rb
class Array
def add_up
Hash.new(0).tap{|h| self.each{|v| h[v]+=1 } }
end
end
You can’t perform that action at this time.