Skip to content

Instantly share code, notes, and snippets.

tateisu tateisu

Block or report user

Report or block tateisu

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
#!/usr/bin/perl --
# プロフィールの表のの中のURLのホスト名のIPアドレスが特定の値ならサスペンドします。
# usage:
# export PSQL="docker exec mastodon1_db_backend_1 psql -U user database"
# export RAILS_CONSOLE=""docker-compose run --rm web bundle exec rails console"
# perl
use strict;
tateisu /
Last active Oct 11, 2019
check sidekiq retry
use strict;
use warnings;
use JSON::XS;
use Data::Dump qw(dump);
open(my $fh,"-|","docker exec mastodon1_redis_1 redis-cli zrange retry 0 -1")
or die "can't open redis-cli. $!";
View gist:647f9149ad6e2bf54dc4a369b5d6c6b4
select count(*) as c,domain from accounts
where exists(select from follows left join accounts as a2 on
where a2.domain is null and
group by domain order by c desc limit 100;
c | domain
1476 |
1186 |
396 |
View gist:531cd72134a37a12c2ec5501636ac3c7
# select * from account_aliases ;
id | account_id | acct | uri | created_at | updated_at
(0 rows)
View gist:f5e4fce826c9a240a0a13a26bbde3948
web_1 | [77bc3d7c-698f-4ae6-a06c-982e517b8916] method=POST path=/settings/aliases format=html controller=Settings::AliasesController action=create status=500 error='ActionView::MissingTemplate: Missing template settings/aliases/show, settings/base/show, application/show with {:locale=>[:ja, :en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :haml]}. Searched in:
web_1 | * "/opt/mastodon/app/views"
web_1 | * "/opt/mastodon/vendor/bundle/ruby/2.6.0/gems/doorkeeper-5.2.0/app/views"
web_1 | * "/opt/mastodon/vendor/bundle/ruby/2.6.0/gems/devise-4.7.1/app/views"
web_1 | * "/opt/mastodon/vendor/bundle/ruby/2.6.0/gems/kaminari-core-1.1.1/app/views"
web_1 | * "/opt/mastodon/vendor/bundle/ruby/2.6.0/gems/pghero-2.3.0/app/views"
web_1 | ' duration=48.89 view=0.00 db=5.22
web_1 | [77bc3d7c-698f-4ae6-a06c-982e517b8916]
web_1 | [77bc3d7c-698f-4ae6-a06c-982e517b8916] ActionView::MissingTemplate (Missing template settings/aliases/show, settings/base/show, application/show with {
tateisu / gist:1616e73dec3602e1c673662873713320
Created Sep 19, 2019
View gist:1616e73dec3602e1c673662873713320
* 測定に使うソフト
* 無線LAN環境
NEC Aterm WG2600HP
tateisu /
Last active Sep 25, 2019
suspend user who in and his note like 'めったにPawooを使いません'.
#!/usr/bin/perl --
use strict;
use warnings;
use utf8;
# mastodonのdockerコンテナの rails console はreadline がUS-ASCIIなので、文字列リテラルはエスケープが必要
sub escapeNonAscii($){
my($a) = @_;
$a =~ s/([\x{80}-\x{fffff}])/"\\u{".sprintf("%x",ord $1)."}"/ge;
View gist:cb0c9ee75ab9eae1b7138d8bc6c4a6b6
$ cat
rm $FILE
mknod $FILE p
read -t 3 <>$FILE answer
echo $? $answer
$ cat
View TestAsyncAlertDialog.kt
package jp.radiko.testasyncalertdialog
import android.os.Bundle
import android.widget.Button
import android.widget.Toast
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
tateisu /
Last active Mar 26, 2019
#!/usr/bin/perl --
use strict;
use warnings;
use feature qw(switch say);
use Math::BigFloat;
use Term::ReadLine;
use Getopt::Long;
# usage: ./ -v "9h15m + 10m - 20m * ( 0.5h / 15m ) * 0.5"
You can’t perform that action at this time.