Skip to content

Instantly share code, notes, and snippets.

View fukubaya's full-sized avatar

Yuichiro FUKUBAYASHI fukubaya

View GitHub Profile
@fukubaya
fukubaya / cocoa.py
Created July 27, 2022 14:58
COCOA exposure_data.json の集計
import json
import datetime
with open("exposure_data.json") as f:
exposure = json.load(f)
result = {}
for x in exposure["exposure_windows"]:
t = int(x['DateMillisSinceEpoch']) / 1000
@fukubaya
fukubaya / init.el
Last active January 18, 2017 18:32
emacs configuration at 2017/01/06
;; -*- coding: utf-8 -*-
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; MELPA
(add-to-list 'package-archives '("melpa"."http://melpa.org/packages/") t)
@fukubaya
fukubaya / get_auth.sh
Created October 11, 2016 13:34
Get auth token from radio server (2016/10)
#!/bin/sh
#playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf
#playerurl=http://radiko.jp/player/swf/player_4.1.0.00.swf
playerurl=http://radiko.jp/apps/js/flash/myplayer-release.swf
#
# access auth1_fms
#
auth1_fms=`/usr/local/bin/wget -q \
@fukubaya
fukubaya / bench.py
Created May 8, 2015 18:11
Comparison of exec time for a list generation in Python
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# bench.py
#
# Created by FUKUBAYASHI Yuichiro on 2015/05/09
# Copyright (c) 2015, FUKUBAYASHI Yuichiro
#
# last update: <2015/05/09 02:42:22>
@fukubaya
fukubaya / mail_form_shortcut.js
Created May 5, 2013 21:36
make a bookmarklet for mail form of sakusaku website. https://www.tvk-yokohama.com/saku2/mail_form.html
/*
* mail_form_shortcut.js
*
* Created by FUKUBAYASHI Yuichiro on 2013/05/06
* Copyright (c) 2013, FUKUBAYASHI Yuichiro
*
* last update: <2013/05/06 06:18:00>
*/
$(document).ready(function(){
var p = {
@fukubaya
fukubaya / hagaki.js
Last active December 10, 2015 10:28
/*
* hagaki.js
*
* Created by FUKUBAYASHI Yuichiro on 2013/01/01
* Copyright (c) 2013, FUKUBAYASHI Yuichiro
*
* last update: <2013/01/01 01:18:12>
*/
TANZAKU = {
N_PER_LINE:26,
@fukubaya
fukubaya / gr_sketch.ino
Last active December 10, 2015 01:58
control full color LED (EP204K-35G1R1B1-CA) with the Arduino compatible board GR-SAKURA (http://japan.renesas.com/products/promotion/gr/index.jsp).
/*
* gr_sketch.ino
*
* Created by FUKUBAYASHI Yuichiro on 2012/12/19
* Copyright (c) 2012, FUKUBAYASHI Yuichiro
*
* last update: <2012/12/23 21:00:36>
*/
#include <rxduino.h>
@fukubaya
fukubaya / rec_99ann.sh
Created October 25, 2012 17:10
Sample script of recording radiko program
#!/bin/sh
ID="LFR"
OFILE="99ann"
TIME="125"
date=`date -v-1d +%Y年%m月%d日`
TITLE="${date} ナインティナインのオールナイトニッポン"
@fukubaya
fukubaya / radiko.ksh
Created October 25, 2012 17:01
Record radiko streaming and add to iTunes
#!/bin/ksh
#-----------------------------------------------------------------
# $1:ID (必須)
# TBS TBSラジオ
# QRR 文化放送
# LFR ニッポン放送
# NSB ラジオNIKKEI
# INT INTERFM
# FMT TOKYO FM
# BAYFM78 BayFm
@fukubaya
fukubaya / get_auth.sh
Created October 25, 2012 16:58
Get auth token from radiko server
#!/bin/sh
playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf
#
# access auth1_fms
#
auth1_fms=`/usr/local/bin/wget -q \
--header="pragma: no-cache" \