Compare commits
11 Commits
32879770ca
...
main
Author | SHA1 | Date | |
---|---|---|---|
bd811dbe63 | |||
ac3de402b8 | |||
2e7d87fb77 | |||
bc424c7346 | |||
543612e5ac | |||
b97738c25a | |||
d41f12210e | |||
fffab990a8 | |||
53d2bcbc11 | |||
af76dcce3f | |||
b2b1099546 |
dotfiles
neomutt
scripts
30
dotfiles/.stow-local-ignore
Normal file
30
dotfiles/.stow-local-ignore
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# The default stow-ignore settings
|
||||||
|
# -------------------------------------
|
||||||
|
# Comments and blank lines are allowed.
|
||||||
|
|
||||||
|
RCS
|
||||||
|
.+,v
|
||||||
|
|
||||||
|
CVS
|
||||||
|
\.\#.+ # CVS conflict files / emacs lock files
|
||||||
|
\.cvsignore
|
||||||
|
|
||||||
|
\.svn
|
||||||
|
_darcs
|
||||||
|
\.hg
|
||||||
|
|
||||||
|
\.git
|
||||||
|
\.gitignore
|
||||||
|
\.gitmodules
|
||||||
|
|
||||||
|
.+~ # emacs backup files
|
||||||
|
\#.*\# # emacs autosave files
|
||||||
|
|
||||||
|
^/README.*
|
||||||
|
^/LICENSE.*
|
||||||
|
^/COPYING
|
||||||
|
# -------------------------------------
|
||||||
|
#
|
||||||
|
# My customizations
|
||||||
|
Makefile
|
||||||
|
\.DS_Store
|
6
dotfiles/Makefile
Normal file
6
dotfiles/Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
test:
|
||||||
|
@echo Test mode, run \"make all\" to enact changes
|
||||||
|
stow -v --no --dotfiles --target ~ .
|
||||||
|
|
||||||
|
all:
|
||||||
|
stow -v --dotfiles --target ~ .
|
@ -8,7 +8,7 @@ unbind l
|
|||||||
bind C-a last-window
|
bind C-a last-window
|
||||||
|
|
||||||
# Reload configs for faster config testing
|
# Reload configs for faster config testing
|
||||||
bind r source-file ~/.tmux.conf
|
bind r source-file ~/.config/tmux/tmux.conf \; display "Reloaded…"
|
||||||
|
|
||||||
# start numbering windows at 1
|
# start numbering windows at 1
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
@ -36,6 +36,17 @@ bind -n M-j select-pane -D
|
|||||||
bind -n M-k select-pane -U
|
bind -n M-k select-pane -U
|
||||||
bind -n M-l select-pane -R
|
bind -n M-l select-pane -R
|
||||||
|
|
||||||
|
# Set the visual style for a window that received a bell
|
||||||
|
set-window-option -g window-status-bell-style bg=color167,fg=colour235 # bg=redish, fg=black
|
||||||
|
|
||||||
|
# Set up the status bar
|
||||||
|
set-option -g status-left-length 30
|
||||||
|
set-option -g status-style fg=colour136,bg=colour235 # fg=brown, bg=black
|
||||||
|
set-option -g status-left "#[fg=green]tdkvxyvkv7 #[fg=white]☰ #[default]"
|
||||||
|
set-option -ag status-right " #[fg=white,bg=default]%H:%M#[default] #[fg=white]%Y-%m-%d"
|
||||||
|
set-option -g status-right " #[fg=white,bg=default]%H:%M#[default] #[fg=white]%Y-%m-%d"
|
||||||
|
set-window-option -g window-status-current-style fg=colour166,bg=colour235
|
||||||
|
|
||||||
# Install the tmux plugin manager
|
# Install the tmux plugin manager
|
||||||
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
# List of plugins
|
# List of plugins
|
@ -30,6 +30,8 @@ macro pager "\e7" "<enter-command>set pager_index_lines=7<enter>" # Chan
|
|||||||
macro pager "\e8" "<enter-command>set pager_index_lines=8<enter>" # Change PIL size
|
macro pager "\e8" "<enter-command>set pager_index_lines=8<enter>" # Change PIL size
|
||||||
macro pager "\e9" "<enter-command>set pager_index_lines=9<enter>" # Change PIL size
|
macro pager "\e9" "<enter-command>set pager_index_lines=9<enter>" # Change PIL size
|
||||||
macro pager "\e0" "<enter-command>set pager_index_lines=0<enter>" # Change PIL size
|
macro pager "\e0" "<enter-command>set pager_index_lines=0<enter>" # Change PIL size
|
||||||
|
macro pager "\ep" "<pipe-message>~/bin/mutt-unproofpoint.py| mdcat -p |less -R<enter>" # attempt view the cleaned message
|
||||||
|
#macro pager "\ep" "<pipe-message>~/bin/mutt-unproofpoint.py| bat --terminal-width=90 -f<enter>" # attempt view the cleaned message
|
||||||
macro pager "\Cb" "<pipe-message>urlview<enter>" # URL viewer.
|
macro pager "\Cb" "<pipe-message>urlview<enter>" # URL viewer.
|
||||||
macro pager "\Cx\Cb" "<change-folder>?" # Folder list.
|
macro pager "\Cx\Cb" "<change-folder>?" # Folder list.
|
||||||
macro pager "\Cx\Cs" "<pipe-message>cat > ~/" # Save message
|
macro pager "\Cx\Cs" "<pipe-message>cat > ~/" # Save message
|
||||||
@ -48,3 +50,8 @@ set invpipe_decode<enter>" # View
|
|||||||
macro generic "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
macro generic "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
||||||
macro index "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
macro index "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
||||||
macro pager "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
macro pager "\e?" "<shell-escape>less /usr/share/doc/mutt/manual.txt<enter>"
|
||||||
|
|
||||||
|
unbind editor <space>
|
||||||
|
macro compose \Ca ":source ~/bin/fzfattach.sh|<enter>"
|
||||||
|
|
||||||
|
macro pager A |'abook --add-email'\n
|
||||||
|
@ -4,22 +4,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Where are mailboxes stored
|
# Where are mailboxes stored
|
||||||
set folder="imaps://imap.gmail.com/"
|
set folder="imaps://imap.misfit.rodeo/INBOX"
|
||||||
|
|
||||||
# Where archived mail goes
|
# Where archived mail goes
|
||||||
set mbox="+[Gmail]/All Mail"
|
set mbox="+Archive"
|
||||||
#set mbox="imaps://imap.gmail.com/[Gmail]/All Mail"
|
#set mbox="imaps://imap.misfit.rodeo/[Gmail]/All Mail"
|
||||||
|
|
||||||
# Where postponed messaged die
|
# Where postponed messaged die
|
||||||
set postponed="+[Gmail]/Drafts"
|
set postponed="+Drafts"
|
||||||
|
|
||||||
# ... and it gets saved in =outbox.
|
# ... and it gets saved in =outbox.
|
||||||
# Gmail does this automatically, let's not duplicate...
|
# Gmail does this automatically, let's not duplicate...
|
||||||
#set record="+[Gmail]/Sent Mail"
|
#set record="+[Gmail]/Sent Mail"
|
||||||
|
set record="+Sent"
|
||||||
|
|
||||||
# Look me up
|
# Look me up
|
||||||
set spoolfile="+INBOX"
|
set spoolfile="+INBOX"
|
||||||
|
|
||||||
mailboxes "+INBOX"
|
mailboxes $spoolfile
|
||||||
|
|
||||||
set imap_check_subscribed = yes
|
set imap_check_subscribed = yes
|
||||||
#mailboxes "imaps://imap.gmail.com/AdminTickets"
|
|
||||||
|
@ -1,9 +1,28 @@
|
|||||||
text/vcard; mutt_vcard_filter; copiousoutput
|
|
||||||
text/html; w3m -dump %s; copiousoutput; nametemplate=%s.html
|
|
||||||
application/x-html; w3m -dump %s; copiousoutput; nametemplate=%s.html
|
|
||||||
image/jpeg; gthumb %s;
|
|
||||||
application/octet-stream; mutt-octet-filter %s; copiousoutput
|
|
||||||
text/x-diff; view %s; needsterminal
|
|
||||||
text/x-patch; view %s; needsterminal
|
|
||||||
application/x-gzip; zcat %s; copiousoutput
|
|
||||||
application/msword; soffice %s;
|
application/msword; soffice %s;
|
||||||
|
|
||||||
|
#application/octet-stream; ~/bin/mutt.octet.filter %s; copiousoutput
|
||||||
|
application/octet-stream; file -b %s; copiousoutput
|
||||||
|
|
||||||
|
application/pdf; open -a "Preview" %s;
|
||||||
|
|
||||||
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; open -a "Microsoft Excel" %s
|
||||||
|
|
||||||
|
application/x-gzip; zcat %s; copiousoutput
|
||||||
|
|
||||||
|
application/x-html; open -a "Firefox" %s; nametemplate=%s.html
|
||||||
|
application/x-html; w3m -dump %s; copiousoutput; nametemplate=%s.html
|
||||||
|
|
||||||
|
image/*; open -a "Preview" %s;
|
||||||
|
|
||||||
|
text/html; open -a "Firefox" %s; nametemplate=%s.html
|
||||||
|
text/html; w3m -dump %s; copiousoutput; nametemplate=%s.html
|
||||||
|
|
||||||
|
# This should work, but doesn't
|
||||||
|
#text/plain; ~/bin/mutt-unproofpoint.py %s; copiousoutput
|
||||||
|
|
||||||
|
text/vcard; mutt_vcard_filter; copiousoutput
|
||||||
|
|
||||||
|
text/x-diff; view %s; needsterminal
|
||||||
|
|
||||||
|
text/x-patch; view %s; needsterminal
|
||||||
|
application/zip; unzip -c %s; copiousoutput; nametemplate=%s.zip
|
||||||
|
@ -1,19 +1,23 @@
|
|||||||
set realname="Orien Vandenbergh"
|
set realname="Orien Vandenbergh"
|
||||||
set signature="~/.signature.txt"
|
set signature="~/.signature.txt"
|
||||||
set from="orien.vandenbergh@guidepointsecurity.com"
|
set from="orien@misfit.rodeo"
|
||||||
set use_from = yes
|
set use_from = yes
|
||||||
set envelope_from = yes
|
set envelope_from = yes
|
||||||
|
|
||||||
set hostname=felurian.guidepointsecurity.com # Name of the localhost
|
set hostname=home.icebergh.us # Name of the localhost
|
||||||
set hidden_host # Hide host details
|
set hidden_host # Hide host details
|
||||||
set alias_file=~/.config/neomutt/aliases # Personal mail aliases
|
set alias_file=~/.config/neomutt/aliases # Personal mail aliases
|
||||||
#set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts
|
#set query_command="~/bin/mutt-ldap '%s'" # How to query the company contacts
|
||||||
|
set query_command="abook --mutt-query '%s'" # How to query the company contacts
|
||||||
set postpone=ask-no # Ask about postponing
|
set postpone=ask-no # Ask about postponing
|
||||||
unset move # Keep read mail in inbox, also Gmail moves it automatically
|
unset move # Keep read mail in inbox, also Gmail moves it automatically
|
||||||
set print=ask-no # Ask before printing
|
set print=ask-no # Ask before printing
|
||||||
set delete=yes # Just delete it
|
set delete=yes # Just delete it
|
||||||
set include # Include messages in replies
|
set include # Include messages in replies
|
||||||
set sort_aux=date-received # Sort threads by date received
|
set sort_aux=date-received # Sort threads by date received
|
||||||
|
set use_threads=yes # Enablig threading
|
||||||
|
set sort=last-date-received # I think this is what I want, sort threads by the last received message
|
||||||
|
# in the thread
|
||||||
set charset=utf-8 # UTF-8 by default
|
set charset=utf-8 # UTF-8 by default
|
||||||
#set noallow_8bit # 8bit isn't safe via Demon.
|
#set noallow_8bit # 8bit isn't safe via Demon.
|
||||||
# Attribution line.
|
# Attribution line.
|
||||||
@ -25,12 +29,13 @@ set editor="vim -c ':0' -c '/^$/' -c ':nohlsearch'"
|
|||||||
#set query_command="lbdbq '%s'" # Use the little brother database for doing queries.
|
#set query_command="lbdbq '%s'" # Use the little brother database for doing queries.
|
||||||
set mark_old # Don't mark unread new msgs as old.
|
set mark_old # Don't mark unread new msgs as old.
|
||||||
set mail_check=90
|
set mail_check=90
|
||||||
|
set mail_check_recent
|
||||||
set timeout=15
|
set timeout=15
|
||||||
set mbox_type=maildir # mailbox type
|
set mbox_type=mbox # mailbox type
|
||||||
set mbox="!" # Default mailbox.
|
set mbox="!" # Default mailbox.
|
||||||
#set imap_user="orien" # How we gonna log in
|
#set imap_user="orien" # How we gonna log in
|
||||||
#set imap_peek="no" # Mark a message as read, when downloaded
|
#set imap_peek="no" # Mark a message as read, when downloaded
|
||||||
set copy # Keep copies of outgoing mail...
|
#set copy # Keep copies of outgoing mail...
|
||||||
set nobeep # We don't need no beeping software.
|
set nobeep # We don't need no beeping software.
|
||||||
set nosmart_wrap # Don't want smart wrapping.
|
set nosmart_wrap # Don't want smart wrapping.
|
||||||
set nomarkers # Don't want any wrap markers.
|
set nomarkers # Don't want any wrap markers.
|
||||||
@ -76,6 +81,8 @@ source ~/.config/neomutt/non-standard # Support for mutt
|
|||||||
source ~/.config/neomutt/save-hooks # Define save-hooks.
|
source ~/.config/neomutt/save-hooks # Define save-hooks.
|
||||||
source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists.
|
source ~/.config/neomutt/subscriptions # Define the list of subscribed mailing lists.
|
||||||
|
|
||||||
|
color index_subject brightred default '~ihubspotemail.net'
|
||||||
|
|
||||||
# Play with the sidebar?
|
# Play with the sidebar?
|
||||||
#set sidebar_divider_char = '|'
|
#set sidebar_divider_char = '|'
|
||||||
set sidebar_visible = yes
|
set sidebar_visible = yes
|
||||||
|
@ -4,4 +4,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
#save-hook .* =Archive/`date "+%Y"`/`date "+%m"`
|
#save-hook .* =Archive/`date "+%Y"`/`date "+%m"`
|
||||||
save-hook .* "=[Gmail]/All Mail"
|
save-hook '=f @analog.com' "=Customers/Analog"
|
||||||
|
save-hook '~f @nafinc\\.com$' "=Customers/NAF"
|
||||||
|
save-hook '~f @newyorklife\\.com$' "=Customers/NYLife"
|
||||||
|
save-hook '=f @rtx.com' "=Customers/RTX"
|
||||||
|
save-hook '=f @shu.edu' "=Customers/SHU"
|
||||||
|
save-hook '=f @partner.paloaltonetworks.com' "=Partners/PaloAlto"
|
||||||
|
save-hook '~f "Krista Trigger via Smartsheet"' "=Customers/Tines"
|
||||||
|
save-hook '~s "(Tines|ADP)" ~f automation@app.smartsheet.com' "=Customers/Tines"
|
||||||
|
save-hook '=f @adp.com' "=Customers/Tines"
|
||||||
|
save-hook '=f @wellington.com' "=Customers/Wellington"
|
||||||
|
|
||||||
|
# This is the default, it must be at the bottom...
|
||||||
|
save-hook '.*' "=[Gmail]/All Mail"
|
||||||
|
#save-hook .* =Archive/`date "+%Y-%m"`
|
||||||
|
#save-hook .* "=[Gmail]/All Mail"
|
||||||
|
57
scripts/hec_test
Executable file
57
scripts/hec_test
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
from datetime import datetime
|
||||||
|
import subprocess
|
||||||
|
import json
|
||||||
|
|
||||||
|
def build_json(field,path):
|
||||||
|
return json.dumps({field:f"This is a sample json event sent to {path}","hecTest":"yes"})
|
||||||
|
|
||||||
|
def build_raw(path):
|
||||||
|
return f"{datetime.now().strftime('%Y-%m-%dT%H:%M:%S.%fZ')} nowhere This is a sample raw event sent to {path} hecTest=yes"
|
||||||
|
|
||||||
|
def test_hec(dtype,verbose,baseurl,path,data):
|
||||||
|
url = baseurl+path
|
||||||
|
cmd = ['curl','-k',url,'-H',f"Authorization: {args.token}",'-d',data]
|
||||||
|
|
||||||
|
if verbose:
|
||||||
|
print(f"Running command:")
|
||||||
|
print(f">\t{cmd[0]} {cmd[1]} {cmd[2]} \\")
|
||||||
|
print(f"\t{cmd[3]} {cmd[4]} \\")
|
||||||
|
print(f"\t{cmd[5]} '{cmd[6]}'")
|
||||||
|
print()
|
||||||
|
else:
|
||||||
|
print(f"Testing '{dtype}': '{path}'")
|
||||||
|
|
||||||
|
result = subprocess.run(cmd,capture_output=True,text=True)
|
||||||
|
#print("stderr")
|
||||||
|
#print(result.stderr)
|
||||||
|
print(f"\033[0;32mResult\033[0m: {result.stdout}")
|
||||||
|
print("")
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
prog='hectest',
|
||||||
|
description='Send a set of test HEC message to a receiver, using a variety of endpoints')
|
||||||
|
|
||||||
|
parser.add_argument('-t', '--token', required=True,
|
||||||
|
help='token to use (required)')
|
||||||
|
parser.add_argument('-v', '--verbose', action='store_true',
|
||||||
|
help='print the curl commands for further debugging')
|
||||||
|
parser.add_argument('url',
|
||||||
|
help="base url to send to, example: 'https://host.com:10080'")
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
# Run an array of hec tests
|
||||||
|
test_hec('json', args.verbose, args.url, '/cribl/_bulk', build_json( '_raw', '/cribl/_bulk'))
|
||||||
|
test_hec('json', args.verbose, args.url, '/services/collector', build_json('event', '/services/collector'))
|
||||||
|
test_hec('json', args.verbose, args.url, '/services/collector/raw', build_json('event', '/services/collector/raw'))
|
||||||
|
test_hec('json', args.verbose, args.url,'/services/collector/event', build_json('event','/services/collector/event'))
|
||||||
|
|
||||||
|
# Run an array of raw tests
|
||||||
|
test_hec( 'raw', args.verbose, args.url, '/cribl/_bulk', build_raw( '/cribl/_bulk'))
|
||||||
|
test_hec( 'raw', args.verbose, args.url, '/services/collector/raw', build_raw( '/services/collector/raw'))
|
||||||
|
|
||||||
|
# Can't send raw to /services/collector
|
||||||
|
# test_hec(args.url, '/services/collector', build_raw( '/services/collector'))
|
97
scripts/mutt-mailhops
Executable file
97
scripts/mutt-mailhops
Executable file
@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
# Copyright (c) 1999 Marius Gedminas <mged...@takas.lt>
|
||||||
|
# Shows the route of an Internet mail message
|
||||||
|
# Version 0.0.1pre-alpha
|
||||||
|
#
|
||||||
|
# Patched by Roland Rosenfeld <rol...@spinnaker.de>
|
||||||
|
# $ Id: mailhops,v 1.3 2000/01/25 20:18:24 roland Exp roland $
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use POSIX qw(mktime);
|
||||||
|
use Date::Parse;
|
||||||
|
|
||||||
|
my $verbose = 0;
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
my %Months = (
|
||||||
|
Jan => 1,
|
||||||
|
Feb => 2,
|
||||||
|
Mar => 3,
|
||||||
|
Apr => 4,
|
||||||
|
May => 5,
|
||||||
|
Jun => 6,
|
||||||
|
Jul => 7,
|
||||||
|
Aug => 8,
|
||||||
|
Sep => 9,
|
||||||
|
Oct => 10,
|
||||||
|
Nov => 11,
|
||||||
|
Dec => 12,
|
||||||
|
);
|
||||||
|
|
||||||
|
# Read headers
|
||||||
|
$/ = '';
|
||||||
|
my $head = <>;
|
||||||
|
$head =~ s/\n\s+/ /g;
|
||||||
|
my @headers = split("\n", $head);
|
||||||
|
|
||||||
|
# Parse headers
|
||||||
|
my @hops;
|
||||||
|
for (@headers) {
|
||||||
|
next unless /^(>?Received|Date):/;
|
||||||
|
my $time;
|
||||||
|
my $host;
|
||||||
|
my $from;
|
||||||
|
if (/^Date:\s+(.*)/) {
|
||||||
|
$host = "Date:";
|
||||||
|
$time = $1;
|
||||||
|
$from = "";
|
||||||
|
} else {
|
||||||
|
$host = "(unknown)";
|
||||||
|
$host = $1 if /\sby\s+([a-z0-9\-_+.]+)\s/ && $1 ne "uid";
|
||||||
|
$from = "(unknown)";
|
||||||
|
$from = $1 if /\sfrom\s+([a-z0-9\-_+.]+(?:\s+[(].+?[)]))\s/;
|
||||||
|
$time = "(unknown)";
|
||||||
|
$time = $1 if /;\s+(.+)$/;
|
||||||
|
$time =~ s/using.*//;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $epoch = str2time ($time);
|
||||||
|
|
||||||
|
unshift @hops, { HOST => $host, FROM => $from, TIME => $epoch};
|
||||||
|
}
|
||||||
|
|
||||||
|
# Print output
|
||||||
|
print " Host Date received (local) Lag
|
||||||
|
Total lag\n";
|
||||||
|
my $nr = 0;
|
||||||
|
my ($first, $prev);
|
||||||
|
for (@hops) {
|
||||||
|
my $host = $_->{HOST};
|
||||||
|
my $from = $_->{FROM};
|
||||||
|
my $time = $_->{TIME};
|
||||||
|
$first = $prev = $time unless defined $first;
|
||||||
|
printf "%2d. %-31.31s", ++$nr, $host;
|
||||||
|
do { print "\n"; next } unless defined $time;
|
||||||
|
|
||||||
|
my $delta = $time - $prev;
|
||||||
|
my $neg = $delta < 0; $delta = abs($delta);
|
||||||
|
my $delta_h = int($delta / 3600);
|
||||||
|
my $delta_m = int(($delta - $delta_h * 3600) / 60);
|
||||||
|
my $delta_s = ($delta - $delta_h * 3600 - $delta_m * 60);
|
||||||
|
|
||||||
|
my ($sec,$min,$hour,$day,$mon,$year,undef,undef,$dst) = localtime($time);
|
||||||
|
|
||||||
|
printf " %4d-%02d-%02d %02d:%02d:%02d %s%02d:%02d:%02d",
|
||||||
|
1900+$year, $mon+1, $day, $hour, $min, $sec,
|
||||||
|
$neg ? '-' : ' ', $delta_h, $delta_m, $delta_s;
|
||||||
|
|
||||||
|
$delta = $time - $first;
|
||||||
|
$neg = $delta < 0; $delta = abs($delta);
|
||||||
|
$delta_h = int($delta / 3600);
|
||||||
|
$delta_m = int(($delta - $delta_h * 3600) / 60);
|
||||||
|
$delta_s = ($delta - $delta_h * 3600 - $delta_m * 60);
|
||||||
|
printf " %s%02d:%02d:%02d\n",
|
||||||
|
$neg ? '-' : ' ', $delta_h, $delta_m, $delta_s;
|
||||||
|
print " from $from\n" if $verbose;
|
||||||
|
$prev = $time;
|
||||||
|
}
|
Reference in New Issue
Block a user