Skip to content

Instantly share code, notes, and snippets.

riocampos riocampos

Block or report user

Report or block riocampos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@riocampos
riocampos / らじるらじるm3u8をffmpegで録音する(8放送局)201709以降対応.txt
Last active Jun 16, 2019
らじるらじる m3u8 を ffmpeg で録音する(8放送局)2017/9 以降対応
View らじるらじるm3u8をffmpegで録音する(8放送局)201709以降対応.txt
## NHKのネット配信サービスであるらじる★らじる。
# 従来は https://gist.github.com/riocampos/5656450 のように rtmpdump を使う必要がありましたが、
# 2017年9月から m3u8 による配信へ変更になったようです。m3u8 なので10秒単位での録音になります。
## 録音コマンド(m4a)
ffmpeg -i M3U8URL -c copy outputfilename.m4a
# ファイルサイズ的に m4a が最も小さくなる
# m4a ファイルのときだけ "-c copy" オプションが使える。
@riocampos
riocampos / mruby120.install.log
Created Dec 19, 2015
mruby 1.2.0 install log
View mruby120.install.log
$ ./minirake
(in /Users/riocampos/Downloads/mruby120)
CC src/array.c -> build/host/src/array.o
CC src/backtrace.c -> build/host/src/backtrace.o
CC src/class.c -> build/host/src/class.o
CC src/codedump.c -> build/host/src/codedump.o
CC src/compar.c -> build/host/src/compar.o
CC src/crc.c -> build/host/src/crc.o
CC src/debug.c -> build/host/src/debug.o
CC src/dump.c -> build/host/src/dump.o
@riocampos
riocampos / css.1blockpkg
Created Sep 26, 2015
iOS content blocker app "1Blocker" sample filter: [css4] class start/end with 'ad' (case ignore)
View css.1blockpkg
[{"id":"6c45f0e0-749a-4fe0-8df2-082a0f1e9191","name":"css only","rules":[{"id":"6479b1f2-a406-49f5-8edb-e3e840610bfe","name":"css_name_start_with_ad","content":{"trigger":{"url-filter":".*","load-type":[]},"action":{"type":"css-display-none","selector":"[class^='ad' i]"}}},{"id":"639fb370-521b-4793-951d-a1c3962298ca","name":"css_name_end_with_ad","content":{"trigger":{"url-filter":".*","load-type":[]},"action":{"type":"css-display-none","selector":"[class$='ad' i]"}}}]}]
View image2base64.rb
#!/usr/bin/env ruby
require 'base64'
print "image filename: "
image_name = gets.chomp
filename = image_name.sub(/\.(\w+)$/) { "_base64_#{$1}.txt" }
open(filename, 'w') { |f| f.write(Base64.encode64(open(image_name).read).tr("\n", "")) }
View Get Web Icon bookmarklet
javascript:(function(){var%20e%3d%5b%5d%3bvar%20t%3d%22%22%3bvar%20n%3ddocument%2egetElementsByTagName%28%22link%22%29%3bvar%20r%3ddocument%2egetElementsByTagName%28%22meta%22%29%3bif%28n%2elength%3e0%29%7bfor%28var%20i%3d0%3bi%3cn%2elength%3bi%2b%2b%29%7bif%28n%5bi%5d%2ehref%2elastIndexOf%28%22apple%2dtouch%2dicon%2epng%22%29%3e%2d1%7c%7cn%5bi%5d%2erel%2eindexOf%28%22apple%2dtouch%2dicon%22%29%3e%2d1%29%7be%2epush%28n%5bi%5d%2ehref%29%3bt%3d%22Web%20Clip%20Icon%22%7d%7dif%28e%2elength%3d%3d%3d0%29%7bfor%28var%20i%3d0%3bi%3cn%2elength%3bi%2b%2b%29%7bif%28typeof%20n%5bi%5d%2erel%21%3d%3d%22undefined%22%26%26n%5bi%5d%2erel%2eindexOf%28%22icon%22%29%3e%2d1%29%7be%2epush%28n%5bi%5d%2ehref%29%3bt%3d%22Favicon%22%7d%7d%7dif%28e%2elength%3d%3d%3d0%29%7bfor%28var%20i%3d0%3bi%3cr%2elength%3bi%2b%2b%29%7bif%28r%5bi%5d%2egetAttribute%28%22property%22%29%21%3dnull%26%26r%5bi%5d%2egetAttribute%28%22property%22%29%2eindexOf%28%22og%3aimage%22%29%3e%2d1%29%7be%2epush%28r%5bi%5d%2econtent%29%3bt%3d%22Open%20Graph%20Protocol%
View script
#!/usr/bin/env ruby
require 'net/http'
require 'twitter'
client = Twitter::REST::Client.new(
consumer_key: "your-consumer-key",
consumer_secret: "your-consumer-secret",
access_token: "your-access-token",
access_token_secret: "your-access-token-secret",
View ruby-2.1.2-install.log
$ ./configure --enable-shared --with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl` && make && sudo make install
checking build system type... x86_64-apple-darwin13.2.0
checking host system type... x86_64-apple-darwin13.2.0
checking target system type... x86_64-apple-darwin13.2.0
checking for gcc-4.2... no
checking for clang... clang
checking for gcc... (cached) clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
@riocampos
riocampos / haskell_install.log
Last active Aug 29, 2015
Haskell install log (OS X Mavericks 10.9.3 / homebrew 0.9.5) brew install ghc haskell-platform / cabal update / cabal install cabal-install
View haskell_install.log
$ brew install ghc haskell-platform
==> Installing dependencies for ghc: gmp, mpfr, libmpc, isl, cloog, gcc
==> Installing ghc dependency: gmp
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gmp-6.0.0a.
######################################################################## 100.0%
==> Pouring gmp-6.0.0a.mavericks.bottle.tar.gz
🍺 /usr/local/Cellar/gmp/6.0.0a: 15 files, 3.2M
==> Installing ghc dependency: mpfr
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/mpfr-3.1.2-
######################################################################## 100.0%
View brew install gtk-doc --verbose (edit xml2po shebang to python path)
mini:~ admin$ brew install gtk-doc --verbose
/usr/bin/env perl -e use XML::Parser
/usr/bin/env perl -e use XML::Parser
==> Writing /usr/local/lib/python2.7/site-packages/sitecustomize.py
==> Writing /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/distutils.cfg
/usr/bin/env perl -e use XML::Parser
==> Downloading http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.18/gtk-doc-1.18.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gtk-doc-1.18.tar.bz2
tar xf /Library/Caches/Homebrew/gtk-doc-1.18.tar.bz2
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/gtk-doc/1.18 --disable-scrollkeeper --with-xml-catalog=/usr/local/etc/xml/catalog
View brew install gtk-doc --verbose log
$ brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 6914aa5e5d81ab7fe9d758e21538790e25c5ed80
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.7.5-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073
You can’t perform that action at this time.