Skip to content

Instantly share code, notes, and snippets.

View louiee's full-sized avatar

Louie Octo louiee

View GitHub Profile
@louiee
louiee / time_sample.txt
Created November 7, 2019 15:30
時間のサンプル
00:06
03:34
12:65
19:11
23
24:34
28:10
99:99
@time = /00:06
@louiee
louiee / member.txt
Created November 7, 2019 14:39
sample text
・サイバーセキュリティ
 ・n19001
 ・n19001
 ・n19001
 ・n19001
 ・n19001
 ・n19001
・ITスペシャリスト
 ・s19001
@louiee
louiee / sessi1.pl
Created October 31, 2019 15:17
摂氏と華氏計算 その2
#!/usr/bin/perl
use 5.010;
print "気温を入れてください。(例:32F,100C):";
my $i = <STDIN>;
my $c;#摂氏
my $f;#華氏
chomp($i);
if ($i =~ /(^[+-]?[0-9]+)([CF])$/){
my $num = $1;
@louiee
louiee / sessi.pl
Created October 31, 2019 15:15
摂氏と華氏計算その1
#!/usr/bin/perl
my $c = 22;
$f = ($c * 9 / 5 )+32; #摂氏から華氏計算
# $c = ($c-32) * 5 / 9; #華氏から摂氏計算
print "摂氏 $c Cは 華氏 $f F \n",$c,$f;
#printf "摂氏 %.2f Cは 華氏 %.2f F \n",$c,$f;
@louiee
louiee / testtest.pl
Created October 25, 2019 01:15
test
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
my @inc = (1..100);
for (@inc){
say ;
}
@louiee
louiee / testtest.pl
Created October 25, 2019 01:13
test
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
my @inc = (1..100);
for (@inc){
say ;
}
@louiee
louiee / kabara.pl
Last active May 20, 2019 12:48
カバラ数とか運命数とか計算するやつ
#!/usr/local/bin/perl
use 5.10.1;
use List::Util qw/sum/;
say "生年月日入力 例:2000年10月1日 だと 20001001";
my $year=<STDIN>;
my @kabara=split(//,$year);
if (sum(@kabara)>11){
@louiee
louiee / fizzbuzz.scm
Last active May 16, 2019 06:55
Fizzbuzz gauche
#!/usr/local/bin/gosh
(define fizzbuzz
(lambda (x)
(if (> x 1) (fizzbuzz (- x 1))
(cond
((= (modulo x 15) 0) (display x ":FizzBuzz"))
((= (modulo x 3) 0) (display x ":Fizz"))
((= (modulo x 5) 0) (display x ":Buzz"))
(else (display x))
@louiee
louiee / removetag.pl
Created January 25, 2018 14:58
Body内のタグ外すスクリプト
#!/usr/bin/perl
use 5.010;
while(<>){
if(/<body/../<\/body/){
if(/<script/../<\/script>/){
$_ =~ s/.*?//g;
}
$_ =~ s/<.*?>//g;
@louiee
louiee / date.pl
Created December 15, 2017 05:28
日付フォーマット
#!/usr/bin/perl
use 5.010;
use warnings;
use strict;
@date =("1月1日", "15/21", "10/46", "7/14", "3/6", "6月7日");
foreach (@date){
if (/(\b[1-9]\b|1[0-2])\/([1-9]$|[12](\d)|3[0-1])/){