Skip to content

Instantly share code, notes, and snippets.

@tateisu
tateisu / recordHls.pl
Created May 18, 2020 11:00
あのサイトのHLS(TS)の録画
#!/usr/bin/perl --
# usage: perl recordHls.pl (room_url)
use strict;
use warnings;
use LWP::UserAgent;
use JSON::XS;
use File::Path;
use MIME::Base64;

help of parent commands

$ docker-compose run --rm web tootctl
Commands:
  tootctl accounts SUBCOMMAND ...ARGS             # Manage accounts
  tootctl cache SUBCOMMAND ...ARGS                # Manage cache
  tootctl domains SUBCOMMAND ...ARGS              # Manage account domains
  tootctl email-domain-blocks SUBCOMMAND ...ARGS  # Manage E-mail domain blocks
  tootctl emoji SUBCOMMAND ...ARGS                # Manage custom emoji
public delegate Boolean WhenCondition(CanStartRoom arg);
public delegate Int64 WhenAction(CanStartRoom arg);
public delegate void WhenPre(CanStartRoom arg);
public class WhenNode {
public String? situation;
public WhenCondition condition;
public WhenAction action;
public WhenPre? preAction;
class CanStartRoom{
public static Tuple<Func<CanStartRoom, Boolean>, Func<CanStartRoom, Int64>> wc(Func<CanStartRoom, Boolean> c, Func<CanStartRoom, Int64> v)
=> whenCase( c, v );
private When<CanStartRoom,Int64> check = new When<CanStartRoom,Int64>(
(self) => self.dontOpen("fallback","マッチする条件がありません"),
wc(
(self) => self.garner.forceOpenReason != null,
(self) => self.willOpen( "forceOpen", self.garner.forceOpenReason ?? "?" )
ジェネリックメソッドの戻り値を T? と書けないC#8.0かっこ悪い
#nullable disable
public static T elementOrNull<T>(this List<T> list, Int32 index) {
try {
return list[ index ];
} catch (IndexOutOfRangeException) {
return default;
}
}
#nullable enable
public static T? elementOrNull<T>(this List<T> list, Int32 index) {
try {
return list[ index ];
} catch (IndexOutOfRangeException) {
return default( T );
}
}

docker-compose run --rm web tootctl email_domains block

No domain(s) given

docker-compose run --rm web tootctl email_domains block ikt.jp

ikt.jp was blocked.
sute.jp
fuyuhasugu.com
15qm.com
ikt.jp
6866880.com
supermailer.jp
jetable.org
tp.renraku.in
rtrtr.com
tempalias.com
0000i.site
000korean.co
000korean.co
4k-2020.com
4k-fullhd.com
5torrent.date
9mmm.men
123i.today
1080p-korean.info
bk.ru
// kotlin
data class Room(val roomUrlKey:String,val isSeed:Boolean, startedAt:Long)
var a = Room("key",false,154920450000L)
var(x,y,z) = a ; // 分解
// C#
internal class Room : IComparable<Room>