This file contains hidden or 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
| # | |
| # Tested on OS X 10.9.2 (MacBook Air) with Perl 5.18.2 and EV 4.17 (kqueue) | |
| # | |
| # 280.9MB memory usage, 0% CPU usage once roundtrips are finished after 29s | |
| # (with all 10k sockets still open) | |
| # | |
| # Get the latest version of Mojolicious from http://github.com/kraih/mojo | |
| # $ sudo sysctl -w kern.maxfiles=40960 kern.maxfilesperproc=20480 | |
| # $ ulimit -n 20480 | |
| # $ LIBEV_FLAGS=8 perl c10k_client.pl |
This file contains hidden or 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
| #FROM: https://gist.githubusercontent.com/rns/84c79eca7ac17e58fc19/raw/d667224fdd11bc924d1bcea6a9756f32c52baa69/velocity.pl | |
| use 5.010; | |
| use strict; | |
| use warnings; | |
| use Data::Dumper; | |
| $Data::Dumper::Indent = 1; | |
| $Data::Dumper::Terse = 1; | |
| $Data::Dumper::Deepcopy = 1; |
This file contains hidden or 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 utf8; | |
| use Mojolicious::Lite; | |
| use DateTime; | |
| get '/' => 'index'; | |
| my $clients = {}; | |
| websocket '/echo' => sub { |
This file contains hidden or 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
| # screen like config | |
| # Ctrl+b " - split pane horizontally. | |
| # Ctrl+b % - split pane vertically. | |
| # Ctrl+b arrow key - switch pane. | |
| # Hold Ctrl+b, don't release it and hold one of the arrow keys - resize pane. | |
| # Ctrl+b c - (c)reate a new window. | |
| # Ctrl+b n - move to the (n)ext window. | |
| # Ctrl+b p - move to the (p)revious window. | |
This file contains hidden or 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
| This was combed from instant messaging session Keith had with Aleksandr. | |
| It describes partitioning as it relates to Postges and how Postgres implements partitioning | |
| (from a user's perspective) using table inheritance. | |
| Keith: do you know what a primary key is? | |
| me: yes | |
| Keith: ok… do you know what a check constraint is | |
| me: yes | |
| Keith: great, do you know what an index is? |
This file contains hidden or 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
| ////////////////////////////////////////////JAVASCRIPT | |
| x=[ | |
| { idade : 12, nome : "caaaa", prioridade : 0, label : "um" }, | |
| { idade : 12, nome : "caaaa", prioridade : -2, label : "dois" }, | |
| { idade : 12, nome : "bbb" } | |
| ]; | |
| y=x.sort(function(a, b) { | |
| return (b.idade > a.idade) |
This file contains hidden or 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 JsEval; | |
| use strict; | |
| use warnings; | |
| use Vim::X; | |
| use JavaScript::V8; | |
| #ABSTRACT: Eval lines of js typed in vim. Use 'vim_log(args)' to print output | |
| =head2 .vimrc |
This file contains hidden or 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 JsMinifier; | |
| use strict; | |
| use warnings; | |
| use Vim::X; | |
| use JavaScript::Packer; | |
| =head2 .vimrc | |
| perl push @INC, '/home/hernan/mnt/desktop/home/hernan/mnt/sda4/files/perl/vimx/lib/'; | |
| perl use JsMinifier; |
This file contains hidden or 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
| perl push @INC, '/home/hernan/vimscripts/lib/'; | |
| perl use JsonPrettyRange; | |
| map ,json :call Vpretty_range(); |
This file contains hidden or 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
| perl push @INC, '/home/usuario/vimscripts/perl/vimx/lib/'; | |
| perl use JsBeautifier; | |
| map ,js :call Vjs_beautifier(); |