Skip to content

Instantly share code, notes, and snippets.

@soramugi
soramugi / radiko.sh
Last active April 13, 2024 06:17
radikoをlinuxで聞いたり録音したりするやつ
#!/bin/bash
# https://mtunn.wordpress.com/odroid-u2★セットアップ/radikoの録音・再生(archlinux)/
pid=$$
wkdir='/var/tmp'
playerurl=http://radiko.jp/player/swf/player_3.0.0.01.swf
playerfile="${wkdir}/player.swf"
keyfile="${wkdir}/authkey.png"
auth1_fms="${wkdir}/auth1_fms_${pid}"
auth2_fms="${wkdir}/auth2_fms_${pid}"
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@penguin2716
penguin2716 / mikutter_dbus_console.rb
Last active October 19, 2015 16:10
mikutter dbus console
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
=begin
mikutter dbus console
Copyright (c) 2014 Takuma Nakajima
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
@philip-goh
philip-goh / screen_grab.cpp
Created October 10, 2012 13:54
Take a screenshot and write it out as a JPEG in C++ on Windows
#include <iostream>
#include <windows.h>
#include <gdiplus.h>
#include <memory>
using namespace Gdiplus;
using namespace std;
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid)
{
@shuujii
shuujii / sqlite3_adapter_with_foreign_key.rb
Created April 30, 2012 06:39
ActiveRecord SQLite3 adapter with foreign key
module ActiveRecord
class Base
class << self
def sqlite3_connection_with_foreign_key(config)
sqlite3_connection_without_foreign_key(config).tap do |db|
db.execute("PRAGMA foreign_keys = ON") if config[:foreign_key]
end
end
alias_method_chain :sqlite3_connection, :foreign_key
end
@kkosuge
kkosuge / userstream.twitter.com2user.json.md
Created October 8, 2011 13:52
Twitter の User Streams で流れてくるやつ