Skip to content

Instantly share code, notes, and snippets.

@nknytk
nknytk / README.md
Last active December 6, 2020 03:45
ラズパイZEROで作った温湿度CO2計を運用して分かったこと

これは Raspberry Pi Advent Calendar 2020 12月6日分の投稿記事です。

ざっくりまとめ

Raspberry Pi Zero WHを使い、気温・湿度・CO2を計測、記録する装置を作り、約半年運用しました。気づいたことは

  • 接触不良に気をつけよう
  • 換気していない状態でのガスコンロ使用と筋トレはCO2濃度を爆上げする
  • 換気扇の威力は絶大
  • 換気するなら空気の流れを作ろう
  • 平均湿度が60%を切るくと踵が割れてくる
@azu
azu / README.md
Last active October 14, 2024 04:02
スタートアップ/企業の調べ方
@voluntas
voluntas / dropbox_api_v2.rst
Last active December 14, 2021 06:38
Dropbox API v2 仕様まとめ
@davecheney
davecheney / bm_test.go
Last active May 10, 2024 18:30
Which is faster ? map[string]bool or map[string]struct{} ?
package bm
import (
"testing"
)
var mb = map[string]bool{
"alpha": true,
"beta": true,
"gamma": true,
@icambridge
icambridge / interface.go
Last active November 1, 2017 00:59
Observer pattern - golang
type TestCallBack struct {
}
func (c *TestCallBack) Exec(o *Observable) {
log.Println(o.Name)
}
type Callback interface {
Exec(h *Observable)
@samaaron
samaaron / bells.clj
Created December 12, 2011 15:20 — forked from jennifersmith/bells.clj
Cheesy Holiday Music and bell synthesis example
(ns overtone-xmas.bells
(:use [overtone.live]))
;;tested in Overtone 0.6-dev
;;add [overtone.sc.machinery.defcgen] to ns :use clause for 0.5.0
;;http://computermusicresource.com/Simple.bell.tutorial.html
(def dull-partials
[
0.56
@kawabata
kawabata / tarai.clj
Created November 16, 2011 21:33
tarai mawashi in overtone
(ns tarai.core
(:use [overtone.live]))
;; basic.clj より
(defsynth foo [freq 200 dur 0.5]
(let [src (saw [freq (* freq 1.01) (* 0.99 freq)])
low (sin-osc (/ freq 2))
filt (lpf src (line:kr (* 10 freq) freq 10))
env (env-gen (perc 0.1 dur) :action FREE)]
(out 0 (pan2 (* 0.1 low env filt)))))
@eliasson
eliasson / digest.clj
Created October 20, 2011 19:16
Clojure md5 digest
(defn md5
"Generate a md5 checksum for the given string"
[token]
(let [hash-bytes
(doto (java.security.MessageDigest/getInstance "MD5")
(.reset)
(.update (.getBytes token)))]
(.toString
(new java.math.BigInteger 1 (.digest hash-bytes)) ; Positive and the size of the number
16))) ; Use base16 i.e. hex
@hitode909
hitode909 / bigaku.rb
Created January 31, 2011 23:42
ブサ彦物語ダウンロードする
# -*- coding: utf-8 -*-
require 'open-uri'
require 'nokogiri'
require 'uri'
$index_url = URI.parse('http://mbbs.tv/u/?id=18over')
$known_pages = []
def page(url)
#!/bin/bash
cd "`dirname $0`/../"
lein compile
git archive --format=tar --prefix=hogehoge/ HEAD | gzip > ../hogehoge.tar.gz
scp -l 800 ../hogehoge.tar.gz server:/tmp/
ssh server "cd /usr/local; tar zxf /tmp/hogehoge.tar.gz"