Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env perl
use common::sense;
use JSON qw(from_json to_json decode_json);
use URI::Encode qw(uri_decode);
use Data::Dumper;
use Dancer2;
use HTTP::CookieJar::LWP ();
use LWP::UserAgent ();
#!/usr/bin/env perl
use JSON qw(from_json to_json decode_json);
use URI::Encode qw(uri_decode);
use Data::Dumper;
use Dancer2;
use HTTP::CookieJar::LWP ();
use LWP::UserAgent ();
use Data::Dumper;
@imyaman
imyaman / dooray-webhook.pl
Created February 20, 2022 10:20
두레이 웹훅 받아서 처리하는 예시
#!/usr/bin/env perl
use JSON qw(from_json to_json);
use URI::Encode qw(uri_decode);
use Data::Dumper;
use Dancer2;
post '/webhook-test' => sub {
my $self = shift;
my ($rbody, $evtype);
@imyaman
imyaman / gist:69bc68b98b6948e799db74a9a128008e
Created February 20, 2022 09:53
Dancer2, webhook, event type에 따른 처리
#!/usr/bin/env perl
use JSON qw(from_json to_json);
use URI::Encode qw(uri_decode);
use Data::Dumper;
use Dancer2;
post '/webhook-test' => sub {
my $self = shift;
my ($rbody, $evtype);
@imyaman
imyaman / gist:58eea0edd89b2e5a14f2262d6b843c40
Created October 2, 2019 06:42
API info for PeerConnection bw8efhl6qc - REMOTEMONSTER WebRTC Broadcast Log
"bw8efhl6qc":{
"2019-10-02T06:38:45.504Z create":"([{"iceServers":[{"urls":"stun:stun.l.google.com:19302"},{"urls":"stun:stun.l.google.com:19302"},{"urls":["turn:54.180.116.134:3478"],"username":"1570001925:showcase","credential":"Sv9X0IYiUMBaVL4waNCkqTdk264="},{"urls":"turn:demo.remotemonster.com:3478","username":"remon","credential":"0987654321"}],"audioType":"music","simulcast":false,"sdpSemantics":"unified-plan","onlyturnserver":false},{"mandatory":{"googHighpassFilter":false,"googEchoCancellation":false,"googEchoCancellation2":false,"googAutoGainControl":false,"googAutoGainControl2":false,"googNoiseSuppression":false,"googNoiseSuppression2":false,"googTypingNoiseDetection":false,"echoCancellation":false},"optional":[{"googCpuOveruseDetection":false}]}])"
"2019-10-02T06:38:45.718Z onsignalingstatechange":"("stable")"
"2019-10-02T06:38:45.718Z - get signalingState":""stable""
"2019-10-02T06:38:45.718Z - get signalingState (1)":""have-remote-offer""
"2019-10-02T06:38:45.718Z ontrack":"("{12345b45-2f24-4aac-
@imyaman
imyaman / gist:faf3fe65b8dc265f3a2ded3b67b8f7eb
Created October 2, 2019 06:35
API info for PeerConnection z6bvfdk9l5 - REMOTEMONSTER WebRTC Call Log
"z6bvfdk9l5":{
"2019-10-02T06:27:04.954Z create":"([{"iceServers":[{"urls":"stun:stun.l.google.com:19302"},{"urls":"stun:stun.l.google.com:19302"},{"urls":["turn:13.209.80.242:3478"],"username":"1570001224:[email protected]","credential":"I9jTnxRDuNxGQ+Xjpxu9UaTdvH4="},{"urls":"turn:demo.remotemonster.com:3478","username":"remon","credential":"0987654321"}],"audioType":"voice","simulcast":false,"sdpSemantics":"unified-plan","onlyturnserver":false},{"optional":[{"googCpuOveruseDetection":false}]}])"
"2019-10-02T06:27:07.710Z onnegotiationneeded":"({})"
"2019-10-02T06:28:57.406Z onsignalingstatechange":"("have-remote-offer")"
"2019-10-02T06:28:57.406Z - get signalingState":""have-remote-offer""
"2019-10-02T06:28:57.406Z - get signalingState (1)":""have-remote-offer""
"2019-10-02T06:28:57.406Z ontrack":"("{f748e5f6-07c7-42c8-bf6f-51f17a1c08c7} 2gA0SuJeJqGOidXSaKxLpZHisWtIgi4S3cQX")"
"2019-10-02T06:28:57.406Z ontrack (1)":"("{54249293-6b34-429c-87f6-c6ef778479d6} 2gA0SuJeJqGOidXSaKxLpZHisWtIgi4S3cQX")
@imyaman
imyaman / gist:640b1a909390fc9d11faa74bc9a8f0f0
Created October 2, 2019 06:17
Firefox Media-WebRTC Call Log
"xtkkqubcxy":{
"2019-10-02T06:13:28.793Z create":"([{"rtcpMuxPolicy":"require","bundlePolicy":"max-bundle","iceServers":[{"urls":["stun:74.125.204.127:19302","stun:[2404:6800:4008:c04::7f]:19302"]},{"urls":["turn:74.125.204.127:19305?transport=udp","turn:[2404:6800:4008:c04::7f]:19305?transport=udp","turn:74.125.204.127:19305?transport=tcp","turn:[2404:6800:4008:c04::7f]:19305?transport=tcp"],"username":"CIWj1uwFEgb4gDMYwAYYzc/s6OMTIICjBQ","credential":"caI+K56S7LEELQx0XIj6Tgu0zLI=","maxRateKbps":"8000"}],"certificates":[{}]},{"optional":[]}])"
"2019-10-02T06:13:28.806Z onnegotiationneeded":"({})"
"2019-10-02T06:13:28.810Z onsignalingstatechange":"("have-local-offer")"
"2019-10-02T06:13:28.810Z - get signalingState":""have-local-offer""
"2019-10-02T06:13:28.810Z onicegatheringstatechange":"("gathering")"
"2019-10-02T06:13:28.820Z onicecandidate":"({"candidate":"candidate:0 1 UDP 2122252543 172.30.1.22 55313 typ host","sdpMid":"0","sdpMLineIndex":0,"usernameFragment":"cddba5b7"})"
"2019-10-02T06:13:28.821Z oni
#!/usr/bin/env perl
use utf8;
use strict;
use Encode;
use JSON;
binmode(STDOUT, ":utf8");
my ($line, $content, $perl_hashref, %perl_hash, $key, $json);
#!/usr/bin/perl
use strict;
use warnings;
use JSON (decode_json);
use Data::Dumper;
use utf8;
$content = qq/ {"Name":"Sangyong Gwak","성명":"곽상용"} /;
print $content;