Skip to content

Instantly share code, notes, and snippets.

@saiten
saiten / rec_radiko.sh
Last active December 2, 2021 05:57
簡易radiko録音ツール。要swftools
#!/bin/sh
playerurl=http://radiko.jp/apps/js/flash/myplayer-release.swf
cookiefile=./cookie.txt
playerfile=./player.swf
keyfile=./authkey.png
if [ $# -eq 1 ]; then
channel=$1
output=./$1.flv
@moyashipan
moyashipan / FollowGround.js
Last active March 15, 2019 20:36
Unity3D: Function to following the ground
// You should change the center of this gameObject's mesh from default value (0,0,0).
// Because this script put its point to the contact point with the ground.
// And "use gravity" must be FALSE.
// Call HitTestWithRoad() from Update()
public var distance:float = 2.0;
public var smoothRatio:float = 0.2;
function HitTestWithRoad() {
@refractalize
refractalize / decrypt.rb
Created January 4, 2012 20:11
Decrypt HTTP Live Streaming TS files
def read_m3u8(m3u8)
File.open(m3u8, 'r') do |file|
keyfile = nil
iv = 0
file.each_line do |line|
line.chomp!
if line =~ /^#EXT-X-KEY:METHOD=AES-128,URI="(.*?)"(,IV=0x(.*))?/
keyfile = $1
if $2
iv = $3
@dupuy
dupuy / README.rst
Last active June 25, 2024 15:05
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@matchy256
matchy256 / rec_radiko.sh
Last active October 31, 2023 08:23 — forked from saiten/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
@j3tm0t0
j3tm0t0 / crontab
Last active February 8, 2021 10:32 — forked from matchy256/rec_radiko.sh
簡易Radiko録音ツール。要swftools/rtmpdump/libxml/wget/ffmpeg/lame
# 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 伊集院光・深夜の馬鹿力 "
59 0 * * 3 sh ~/bin/rec_radiko.sh TBS 122 ~/mp3/"JUNK 爆笑問題カーボーイ "
@plentz
plentz / nginx.conf
Last active July 2, 2024 13:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ybenjo
ybenjo / README.md
Last active December 13, 2023 08:04 — forked from yagays/agqr.rb
save AGQR radio programs.

agqr.rb

これは何

AGQR の放送を保存するスクリプト.

fork 元との違いは

yagays / agqr.rb には

  • 31日まである月に翌日の指定が失敗する

というバグが存在する.

@shekibobo
shekibobo / README.md
Last active March 2, 2020 11:04
Android: Base Styles for Button (not provided by AppCompat)

How to create custom button styles using Android's AppCompat-v7:21

Introduction

AppCompat is an Android support library to provide backwards-compatible functionality for Material design patterns. It currently comes bundled with a set of styles in the Theme.AppCompat and Widget.AppCompat namespaces. However, there is a critical component missing which I would have thought essential to provide the a default from which we could inherit our styles: Widget.AppCompat.Button. Sure, there's Widget.AppCompat.Light.ActionButton, but that doesn't actually inherit from Widget.ActionButton, which does not inherit from Widget.Button, so we might get some unexpected behavior using that as our base button style, mainly because Widget.ActionButton strictly belongs in the ActionBar.

So, if we want to have a decently normal default button style related to AppCompat, we need to make it ourselves. Let's start by digging into the Android SDK to see how it's doing default styles.

Digging In