Skip to content

Instantly share code, notes, and snippets.

@yasu47b
yasu47b / save_zbx_graph.pl
Last active August 29, 2015 14:26
mojo useragentでzabbixからpng画像を取得するサンプル
use strict;
use warnings;
use 5.010;
use Data::Dumper;
use Mojo::UserAgent;
use Mojo::JSON('decode_json');
my $conf = {
host=>'localhost',
user=>'admin',
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Data::Dumper;
use Mojo::UserAgent;
use Mojo::JSON('decode_json');
use utf8;
use Encode qw(encode);
use strict;
use warnings;
use feature 'say';
use Mojo::DOM;
use Mojo::UserAgent;
use Data::Dumper;
use Encode;
my $ua = Mojo::UserAgent->new;

my git quick reference

remove remote branch

git push <remote name> :<remote branch name>
git push origin :hoge

show differences

// 休日のjsonを返す
// this gas return json that all holidays in this month
// or reutrn specific range of holidays if keys esisted. eg http://<script_url>?start_date=2016-04-10&end_date=2016-05-11
function doGet(e) {
var today = new Date();
// キーの取得
var param_start_date = e.parameter.start_date;
var param_end_date = e.parameter.end_date;
var output = {};

1. add disk or expand disk

1.1 add disk to VM from virtualbox manager

go 2.set LVM in VM

1.2 expand disk

set new partition

use strict;
use warnings;
use 5.010;
my @array = (10,8,2,2);
while( my ($i, $e) = each @array){
say "i: $i, e: $e";
}
alert('hoge')
reset max of y axis
```
chart.internal.config.axis_y_max=undefined;
```

Environment

  • CentOS 6.7
  • DB2 Express v10.5

Connection Setting

DB2 connection setting to allow external connection using TCP/IP.

# edit service file