Skip to content

Instantly share code, notes, and snippets.

View pokutuna's full-sized avatar
👁️
👄👁👂

pokutuna pokutuna

👁️
👄👁👂
View GitHub Profile
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"io/ioutil"
"os"
)
package main
import (
"fmt"
"time"
)
func intervalIterator(from, to time.Time, interval time.Duration) struct {
hasNext func() bool
get func() time.Time

日本海に行きたい

  • 日程: 5/5-6 1泊2日
  • 目的:
    • 日本海を見る
    • 海っぽいものを食べる

ルート

class BoxMuller
def initialize(average, deviation)
@pos = -1
@ave = average
@dev = deviation
@buf = Array.new
end
def get(position = @pos)
return @buf[position]
class File
def self.actual_path(file = nil)
file = __FILE__ if file == nil
file = File.expand_path(file)
if File.ftype(file) == 'link' then
actpath = File.readlink(file)
file = File.actual_path(actpath)
end
return file
module Latin1Conv
require 'cgi'
LATIN1_CONVERT_TABLE = {
' ' => ' ',
'¡' => '¡',
'¢' => '¢',
'£' => '£',
'¤' => '¤',
# -*- coding: utf-8 -*-
require 'date'
require 'monitor'
WAIT_TIME = 10
class BDALogger
attr_accessor :today, :logfile
ティップ
Giga Pointsがいいらしい
バレル
真鍮(ブラス)は飲み食いしながらはマズそう
安いのいくつか買うべき?
グリップ力の違い
*グリップ弱いほうが好みそう
形状による感覚の違い
細く長い: 重く感じる
ぐちゃぐちゃなコードは開発を遅くする
生産性を守るためにはコードを常に綺麗な状態に保つ
書くのは1回、読むのは何回も
2章 意味のある名前
意図が明確な名前にする
なぜそれが存在するのか、何をするのか、どのように使用するのか
もし名前に解説が必要なら、意図が明確な名前ではない
int d //日単位の経過時間
require 'formula'
class Nano <Formula
url 'http://www.nano-editor.org/dist/v2.2/nano-2.2.6.tar.gz'
homepage 'http://www.nano-editor.org/'
md5 '03233ae480689a008eb98feb1b599807'
depends_on 'ncursesw'
def install