Skip to content

Instantly share code, notes, and snippets.

View akkunchoi's full-sized avatar

Akiyoshi Tanaka akkunchoi

View GitHub Profile
# https://github.com/kylestetz/slang
@bass (adsr (osc saw) 0 0.5 0 0.5) + (filter lp 20)
play @bass (rhythm [8n 16n 8n 16n r16n]) (notes [e1 e2 e1 d2])
@pluck (adsr (osc saw) 0 0.05 0 0)
play @pluck (rhythm [16n]) (notes [e4 d4 e4 g4])
@doot (adsr (osc square) 0 0.04 0.1 0) + (filter lp 20)
play @doot (rhythm [r16n 16n 16n 16n]) (notes [e2 e2 e2 d3 g3 a3])
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@biovisualize
biovisualize / index.html
Last active October 15, 2018 01:29
D3.js Reusable Bar Chart with Angularjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 14px sans-serif;
}
.axis path, .axis line {
fill: none;
@rummelonp
rummelonp / rails_console_lib_reaload.rb
Last active December 14, 2015 13:58
rails console で reload! した時に lib も再読み込みするやつ
if defined?(Rails)
lib = File::join(Rails.root, 'lib')
ActiveSupport::Dependencies.autoload_paths << lib
Dir[lib + '/**'].each do |f|
class_name = File.basename(f).sub(/\.rb$/, '').camelize
ActiveSupport::Dependencies.explicitly_unloadable_constants << class_name
end
end
@kizzx2
kizzx2 / post.rb
Last active June 26, 2021 12:14
A clean and elegant approach to partial object validation with Rails + Wicked wizards (using session to store the partial object)
class Post < ActiveRecord::Base
attr_accessible :body, :price, :title
validates_presence_of :title
validates_length_of :title, minimum: 10
validates_presence_of :body
validates_numericality_of :price, greater_than: 0
end
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@akkunchoi
akkunchoi / .gitignore
Created June 25, 2012 17:58 — forked from butlermh/wishlist.rb
欲しい物リストをカーリルで検索 - Find out what books are available on your Amazon wishlist on Calil
config.yml
use strict;
use warnings;
use Time::HiRes qw/time/;
use Term::ANSIColor;
$SIG{INT} = 'print_score';
my $from = defined $ARGV[0] ? $ARGV[0] : 100;
my $to = defined $ARGV[1] ? $ARGV[1] : 999;
die "Need from <= to ($from > $to)" if($from > $to);
@bennylope
bennylope / gist:1894706
Created February 23, 2012 19:50
Canonical URLs with Jekyll
<link rel="canonical" href="http://yourdomain.com{{ page.url | replace:'index.html','' }}" />
require 'rubygems'
require 'net/imap'
require 'kconv'
require 'pit'
require 'logger'
class ImapFetcher
def initialize(pit_name)
@pit = Pit.get(