This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls | perl -nlE'say $_ if length $_ == 40' | xargs rm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use HTTP::Tiny; | |
use JSON::PP; | |
my $json; | |
my $location_list = [ [ '東京' => '130010' ], [ '大阪' => '270000' ] ]; | |
get '/' => sub { | |
my $c = shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use utf8; | |
use JSON; | |
use HTTP::Tiny; | |
# Goolge Cloud Natural Language API analyzeSentiment | |
my $GOOGLE_API_URL | |
= 'https://language.googleapis.com/v1/documents:analyzeSentiment'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Calc; | |
use strict; | |
use warnings; | |
sub new { | |
my $class = shift; | |
my @argv = @_; | |
my $self = bless { nums => \@argv }, $class; | |
return $self; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
use HTTP::Tiny; | |
use JSON; | |
# ピザ会課題 | |
# mojoliciousから、IFTTTのwebhookに経由でLINEを送る | |
# IFTTT経由でLINEにメッセージを送る処理 | |
# IFTTT側での準備が必要 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env perl | |
use strict; | |
use warnings; | |
use HTTP::Tiny; | |
use MIME::Base64 qw/encode_base64/; | |
my $url = 'BASIC認証越しにあるファイルのURL'; | |
my $user = 'user'; | |
my $password = 'password'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
for i := 1; i <= 100; i++ { | |
if i%15 == 0 { | |
fmt.Println("fizzbuzz") | |
} else if i%3 == 0 { | |
fmt.Println("fizz") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
for i := 1; i <= 100; i++ { | |
switch { | |
case i%15 == 0: | |
fmt.Println("fizzbuzz") | |
case i%3 == 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
# 本来の書き方 | |
# get '/' => sub { | |
# my $c = shift; | |
# $c->render(template => 'index'); | |
# }; | |
# サブルーチンリファレンスを作る |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hello, World(Yahoo) | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.yahoo.co.jp/ | |
// @grant none | |
// ==/UserScript== |