$ brew install automake autoconf libtool
$ git clone git://git.savannah.gnu.org/screen.git
$ cd screen/src
$ ./autogen.sh
$ ./configure --enable-colors256
$ make
## make sure iTerm2's terminal type is xterm-256color!
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 feature qw{say}; | |
use WWW::YouTube::Download; | |
my $url = shift or die "Specify a video url.\n"; | |
my $client = WWW::YouTube::Download->new; |
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 subs qw{ template heredoc }; | |
my $doc = heredoc q{ | |
Very simple template engine :) | |
My name is <% name >. It's <% hour >:<% minute >. | |
}; |
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 utf8; | |
use Encode qw{ encode decode }; | |
use WWW::YouTube::Download; | |
use Term::ReadKey (); | |
use List::Util qw(first); | |
use File::Temp (); | |
use File::Spec (); |
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 Markdent::Simple::Document; | |
my $parser = Markdent::Simple::Document->new; | |
print $parser->markdown_to_html( | |
title => 'GFM Example', | |
dialect => 'GitHub', |
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 utf8; | |
use Encode 'encode'; | |
my %accent = ( | |
"Â" => 1, | |
"\x{C2}" => 1, | |
"\N{U+C2}" => 1, | |
"\xC2" => 1, | |
encode('latin-1', "Â") => 1, | |
); |
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
#!/bin/bash | |
# curl -kL https://gist.github.com/raw/4523388 | bash | |
# wget -O - https://gist.github.com/raw/4523388 | bash | |
sudo apt-get -y update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install \ | |
git \ | |
vim-gnome \ |
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
#!/bin/bash | |
# curl -kL https://gist.github.com/raw/4529809 | bash | |
sudo yum -y update | |
sudo yum -y groupinstall "Development Tools" | |
sudo yum -y install \ | |
git vim-enhanced ncurses-devel wget zsh lsof \ | |
gcc-c++ patch readline readline-devel \ | |
zlib zlib-devel libffi-devel openssl-devel \ |
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 $self = shift; | |
$self->render_static('image.png'); | |
}; | |
hook before_routes => sub { | |
my $c = shift; |
- If you don't specify user, then your local user name will be used.
- If you don't specify auth method, rex try to use several auth methods.
- If you want to know what is going on, why don't you set -d (debug) option?
- If you want to turn off INFO message, set $Rex::Logger::silent = 1;
- prepare