Skip to content

Instantly share code, notes, and snippets.

View JEEN's full-sized avatar

Jeen Lee JEEN

View GitHub Profile
@JEEN
JEEN / MediaChannel.ts
Created February 19, 2019 05:53
MediaChannel.ts
import {readFileSync} from 'fs';
import Container, { ContainerInfo } from './Container';
import MediaLiveRole from './MediaLiveRole';
import { config } from 'aws-sdk';
export default class LiveChannel {
inputStreamName: string;
mediaLive: AWS.MediaLive;
inputSecurityGroup: AWS.MediaLive.InputSecurityGroup;
input: AWS.MediaLive.Input;
@JEEN
JEEN / check-unused-security-groups.sh
Created August 17, 2018 12:48
check-unused-security-groups.sh
#!/bin/bash
rm -rf security-groups
rm -rf inuse-sg
rm -rf uniq-inuse
rm -rf unused-security-groups.txt
aws ec2 describe-security-groups --output json | jq -r '.SecurityGroups[].GroupId' | sort > security-groups
aws ec2 describe-instances --output json | jq -r '.Reservations[].Instances[].SecurityGroups[].GroupId' > inuse-sg
aws elb describe-load-balancers --output json | jq -r '.LoadBalancerDescriptions[].SecurityGroups[]' >> inuse-sg
@JEEN
JEEN / map3.pl
Created December 7, 2016 00:21
use strict;
use warnings;
use Text::CSV_XS;
use Data::Printer;
my $csv = Text::CSV_XS->new({ binary => 1, sep_char => "\t" });
open my $fh, "<", $ARGV[0] or die $!;
open my $fh2, "<", $ARGV[1] or die $!;
# 1. 키맵 생성
@JEEN
JEEN / map2.pl
Created December 6, 2016 07:01
map2.pl
use strict;
use warnings;
use Text::CSV_XS;
use Data::Printer;
my $csv = Text::CSV_XS->new({ binary => 1, sep_char => "\t" });
open my $fh, "<", $ARGV[0] or die $!;
open my $fh2, "<", $ARGV[1] or die $!;
# 1. 키맵 생성
@JEEN
JEEN / map1.pl
Last active December 6, 2016 06:51
map1.pl
use strict;
use warnings;
use Text::CSV_XS;
use Data::Printer;
my $csv = Text::CSV_XS->new({ binary => 1, sep_char => "\t" });
open my $fh, "<", $ARGV[0] or die $!;
open my $fh2, "<", $ARGV[1] or die $!;
# 1. 키맵 생성
@JEEN
JEEN / AqNk55CB.txt
Created October 10, 2016 06:59
AqNk55CB.txt
iceplant_tr_128913 Aca1
iceplant_tr_31188 Aca7a
iceplant_tr_236065 Aca7b
iceplant_tr_6046 Bca1 (repressed)
iceplant_tr_1475 Bca2 (CAM)
iceplant_tr_128480 Bca5
iceplant_tr_126372 Gca1a
iceplant_tr_127828 Gca1b
iceplant_tr_242248 Gca2
iceplant_tr_251007 Ppc1 (CAM)
@JEEN
JEEN / move_all.pl
Created October 10, 2016 06:58
move_all.pl
use strict;
use warnings;
use File::Copy;
open my $fh, "<", $ARGV[0] or die $!;
while(<$fh>) {
s/[\r\n]//g;
my ($col1, $col2) = split "\t", $_;
$col2 =~ s/[^a-zA-Z0-9-_]/_/g;
move($col1, $col2);
@JEEN
JEEN / result.txt
Created October 5, 2016 00:56
result.txt
Val GTT 0.080
Val GTA 0.050
Thr ACA 0.140
Thr ACT 0.110
Glu GAA 0.100
Tyr TAT 0.140
Ile ATA 0.090
Ser TCT 0.060
Ser TCA 0.070
Ser AGT 0.080
@JEEN
JEEN / for-yim.pl
Created October 5, 2016 00:56
for-yim.pl
use strict;
use warnings;
use JSON::XS;
use Text::CSV_XS;
use Data::Printer;
my $csv = Text::CSV_XS->new({ binary => 1, sep => "\t" });
open my $code_fh, "<", $ARGV[0] or die $!;
#open my $codon_fh, "<", $ARGV[1] or die $!;
my %code_map = ();
@JEEN
JEEN / inner-peace.pl
Last active August 14, 2016 06:31
>>마음의 평화를 얻는 방법<<
use strict;
use warnings;
use Math::NumSeq::Primes;
my $seq = Math::NumSeq::Primes->new;
while(my ($i, $value) = $seq->next) {
print "$value\n";
last if $i >= 100;
}