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
anonymous
anonymous / gist:999891
Created May 31, 2011 05:02
#!ruby -Ks
require 'rubygems'
require 'ffi'
module VoiceText
extend FFI::Library
ffi_lib('vt_jpn')
class INT < FFI::Struct
layout :val, :int
@saiten
saiten / radiru.txt
Created September 1, 2011 09:02
らじるらじるをrtmpdumpで録音する
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須
# CentOS5 32bitのさくらVPS、OSX Lionで動作確認。(OSX LionではRTMPDumpを32bitでビルド)
# ラジオ第1
rtmpdump --rtmp "rtmpe://netradio-r1-flash.nhk.jp" \
--playpath 'NetRadio_R1_flash@63346' \
--app "live" \
-W http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf \
--live \
-o r1.m4a
@tomykaira
tomykaira / markdown-to-hiki.rb
Created March 2, 2012 08:50
Convert markdown to hiki / markdown テキストから hiki 形式に変換するスクリプト(適当)
# -*- coding: utf-8 -*-
ARGV.each do |fn|
lines = File.readlines(fn)
hiki = lines.map { |l|
l.sub(/^(#+)\s/){ '!'*($1.length) + ' ' }.
sub(/^(-+)\s/){ '*'*($1.length) + ' ' }.
gsub(/\!\[([^\]]+)\]\(([^\)]+)\)/){ $2[0..3] == 'http' ? $2 : ('http://goos-lokka.heroku.com' + $2) }. # picture
gsub(/\[([^\]]+)\]\(([^\)]+)\)/, '[[\1|\2]]'). # url
gsub(/\*\*([^*]*)\*\*/, "'''\\1'''").
sub(/^ /, ' ').
誰かこれ↓の現状をご存知ないでしょうか?
https://web.archive.org/web/20090228024115/http://blogs.sun.com/reiko/entry/%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AB%E3%82%AC%E3%82%A4%E3%83%89
その他、翻訳する人が最初に読んでおいた方がよさそうなもの。
https://web.archive.org/web/20090228024326/http://blogs.sun.com/reiko/entry/shaped_window_%E3%81%AF%E3%81%A9%E3%81%86%E8%A8%B3%E3%81%99_how_would
https://web.archive.org/web/20090301215629/http://blogs.sun.com/reiko/entry/%E5%8F%97%E5%8B%95%E6%85%8B%E3%81%AE%E7%BF%BB%E8%A8%B3
https://web.archive.org/web/20090228050234/http://blogs.sun.com/reiko/entry/%E7%BF%BB%E8%A8%B3%E3%81%AE%E5%93%81%E8%B3%AA
https://web.archive.org/web/20090301135955/http://blogs.sun.com/reiko/entry/%E6%80%9D%E3%81%84%E3%82%84%E3%82%8A%E3%81%AE%E3%81%82%E3%82%8B%E7%BF%BB%E8%A8%B3
@harshavardhana
harshavardhana / nginx-minio-static.md
Last active May 6, 2025 07:55 — forked from koolhead17/gist:4b8dd8d95ec86368634693cf9ad9391c
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@michel-zimmer
michel-zimmer / readme.md
Last active September 25, 2024 10:26
Add a guest for sddm (tested under KDE neon)

Add a guest user for sddm

The objective is to create a passwordless login for a user named guest, whose home directory is cleared on logout.

This was tested under KDE neon (which is based on Ubuntu 16.04).

The following script clears the home directory of a user and replaces it with a tmpfs containing the contents of /etc/skel:

#!/bin/sh -e
@itsundef
itsundef / libinput-gestures.conf
Last active December 31, 2023 23:01
macOS like gestures on linux with libinput-gestures on KDE - Configure switching shortcuts for workspace / virtual desktops similar to line 50-55.
# Configuration file for libinput-gestures.
#
# The default configuration file exists at /etc/libinput-gestures.conf
# but a user can create a personal custom configuration file at
# ~/.config/libinput-gestures.conf.
#
# Lines starting with '#' and blank lines are ignored. Currently
# "gesture" and "device" configuration keywords are supported as
# described below. The keyword can optionally be appended with a ":" (to
# maintain compatibility with original format configuration files).
@vintprox
vintprox / minetest-better-fonts-2023.md
Last active November 23, 2024 10:34
Better (unicode) fonts for Minetest 2023

Better (unicode) fonts for Minetest 2023

  • Tired of boring default font in Minetest?
  • Have the text become increasingly harder to read?
  • Does the current font wear you off, stealing all your concentration?
  • Do you want one that you can recommended to anyone else, for any language?

Try something different, with this guide! Showing you how to setup a few beatiful fonts for Minetest today.

I just think they're neat.

@mss
mss / flatpak-spawn-host.md
Last active May 26, 2025 15:17
How to execute binaries from $PATH from flatpak applications

Let's say you don't want to install Visual Studio Code from their package repository but use the flatpak package instead. This works but as soon as you try to execute any binaries from your regular PATH they won't be found since that's blocked by the sandbox. Even giving full host filesystem access won't work reliably because that filesystem will be mounted under /run/host which messes up any absolute paths which are often baked into the most unexpected places.

After lots of digging I found this solution from the qutebrowser flatpak maintainer. Just in case Reddit dies a copy can be found below.

I assumed that the mentioned flatpak-spawn-wrapper was a feature shipped in all flatpaks but it looks like only flatpak-spawn is included and that wrapper is a [script](https://github.com/flathub/org.qutebrowser.qutebrowser/blob/master/