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
extern crate ws; | |
extern crate env_logger; | |
use chrono::{Local, DateTime}; | |
use ws::{listen, CloseCode, Sender, Handler, Handshake, Message, Result}; | |
fn main() { | |
// ロガーの初期化 | |
env_logger::init(); |
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
def main() | |
prob = ARGV[0].to_i | |
hit = ARGV[1].to_i | |
random = Random.new | |
begin | |
if !prob || prob == 0 || !hit || hit == 0 then | |
raise "bad argument..." | |
end |
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
{ | |
"name":"Atom-Monokai", | |
"version":"1.0", | |
"description":"monokai by atom editor", | |
"originator":"Xamarin Inc. (http://xamarin.com)", | |
"baseScheme":"Monokai", | |
"colors":[ | |
], | |
"text":[ | |
{"name": "User Field Usage", "fore":"#FFFFFF" }, |
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 Test::Web::Controller::Base; | |
use Mojo::Base 'Mojolicious::Controller'; | |
sub init { | |
my $self = shift; | |
$self->check_valid_session; | |
} | |
sub check_valid_session { | |
my $self = 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
package Test::Web::CLI::Base; | |
use Mojo::Base qw/Mojolicious::Command/; | |
# public processing for CLI | |
sub get_data { | |
my $self = shift; | |
return 'data'; | |
} | |
1; |