Skip to content

Instantly share code, notes, and snippets.

View d.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use bigint;
my @combination;
my ($A, $B, $K);
View fdupes-4096byte-en.sh
# show version
fdupes --version
fdupes 2.1.2
# Same size 10G file
ls -l
合計 20971536
-rw-r--r-- 1 root root 10737422336 2021/05/06_02:44:42 1.dat
View hoge.txt
2021年 5月 25日 火曜日 03:55:19 JST
View get-tumblr-text.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use HTTP::Tiny;
use JSON::PP;
use Getopt::Long;
use Time::Piece;
use File::Path;
View fdupes-4096byte.sh
# version確認
fdupes --version
fdupes 2.1.2
# サイズが同じ10Gのファイル
ls -l
合計 20971536
-rw-r--r-- 1 root root 10737422336 2021/05/06_02:44:42 1.dat
View apache-req-summary.pl
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(:5.10);
use utf8;
use Time::Piece;
my $OUTFILE = "/root/count.csv";
my $infile = shift;
View mpd.conf
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/tag_cache"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
user "mpd"
bind_to_address "localhost"
input {
View ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: neg-demo-ing
namespace: default
annotations:
kubernetes.io/ingress.regional-static-ip-name: STATIC_IP_NAME
kubernetes.io/ingress.class: "gce-internal"
spec:
backend:
View ore_hdd-power-on-hours
#!/bin/bash
set -eu
function power-on-hours {
echo -n "$1: "
smartctl -A $1 | grep -i power_on_hours | perl -nlE '/\d+(\s\(.*\))?$/;say $&'
}
power-on-hours /dev/sda
power-on-hours /dev/sdb
power-on-hours /dev/sdc