Skip to content

Instantly share code, notes, and snippets.

@takeru
takeru / radiko.sh
Created August 6, 2012 13:55
radiko.sh
#!/bin/sh
## http://blog.half-moon.org/archives/963 @ 2012/05/25
if [ $# -eq 3 ]; then
OUTFILEPREFIX=$1
RECTIMEMIN=$2
CHANNEL=$3
else
echo "usage : $0 OUTFILEPREFIX RECTIMEMIN CHANNEL"
@takeru
takeru / Gemfile
Last active January 17, 2016 14:56
Faraday async
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
gem 'faraday'
gem 'faraday_middleware'
gem 'em-synchrony'
gem 'em-http-request'
gem 'multi_xml'
@takeru
takeru / crontab
Last active February 23, 2016 09:27 — forked from j3tm0t0/crontab
./rec_radiko.sh: 127: ./rec_radiko.sh: Syntax error: "(" unexpected ってなるから。
MAILTO=j3tm0t0@gmail.com
# ANN
59 0 * * 5 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"ナインティナインのオールナイトニッポン "
59 0 * * 7 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"オードリーのオールナイトニッポン "
# ANN0
59 2 * * 5 sh ~/bin/rec_radiko.sh LFR 122 ~/mp3/"Hi-Hiのオールナイトニッポン0 "
# JUNK
59 0 * * 2 sh ~/bin/rec_radiko.sh TBS 122 ~/mp3/"JUNK 伊集院光・深夜の馬鹿力 "
@takeru
takeru / gist:8803846
Created February 4, 2014 13:48
iMac+USB3.0 UASPのSSDがKernel panic
Anonymous UUID: B4A99582-D3B2-CF1F-6340-AD71DF12D891
Tue Feb 4 22:24:50 2014
panic(cpu 0 caller 0xffffff80072b995c): "complete() while dma active"@/SourceCache/xnu/xnu-2422.1.72/iokit/Kernel/IOMemoryDescriptor.cpp:2619
Backtrace (CPU 0), Frame : Return Address
0xffffff80f7e53af0 : 0xffffff8006e22f69
0xffffff80f7e53b70 : 0xffffff80072b995c
0xffffff80f7e53bb0 : 0xffffff7f874c5b06
0xffffff80f7e53bf0 : 0xffffff7f874c442c
0xffffff80f7e53cb0 : 0xffffff7f874c2af4
@takeru
takeru / private.xml
Last active August 29, 2015 14:01
private.xml of KeyRemap4MacBook to fix "Microsoft Remote Desktop" with JIS Keyboard
<?xml version="1.0"?>
<root>
<appdef>
<appname>MicrosoftRDC</appname>
<equal>com.microsoft.rdc.mac</equal>
</appdef>
<symbol_map type="KeyCode" name="RDC_VK_F1" value="0x7a"/>
<symbol_map type="KeyCode" name="RDC_VK_F2" value="0x78"/>
<symbol_map type="KeyCode" name="RDC_VK_F3" value="0x63"/>
<symbol_map type="KeyCode" name="RDC_VK_F4" value="0x76"/>
@takeru
takeru / README.md
Last active August 29, 2015 14:03 — forked from mbostock/.block
require "coreaudio"
dev = CoreAudio.default_output_device
def f2(x)
x = x % (Math::PI*2.0)
if x<Math::PI
return 1
else
return -1
function doGet(e)
{
if(!true){
e = {
parameter:{
id: "xxxx",
name: "Sheet1",
range:"A1",
data:"[[123]]"
}
@takeru
takeru / return.ex
Created March 22, 2017 14:44
return in Elixir
defmodule Return do
defmacro returnable(do: block) do
quote do
try do
unquote(block)
catch
{:return, result} -> result
end
end
end
@takeru
takeru / Dockerfile
Created August 23, 2019 14:39
TensorFlow 1.13.1-gpu-py3-jupyter + OpenAI Gym Environments for Donkey Car + Simulator on Mac
# git clone https://github.com/tensorflow/tensorflow.git
# cd tensorflow/tensorflow/tools/dockerfiles
# docker build -f dockerfiles/gpu-jupyter.Dockerfile -t tf:1.13.1-gpu-py3-jupyter . --build-arg USE_PYTHON_3_NOT_2=True --build-arg TF_PACKAGE_VERSION=1.13.1
FROM tf:1.13.1-gpu-py3-jupyter
RUN apt install -y git lv nano tree wget
RUN git clone https://github.com/autorope/donkeycar.git
RUN cd /tf/donkeycar && \