Browse Source

Add util script to print out Verus block maturity dates

master
Jonathan "Duke" Leto 6 years ago
parent
commit
2c01ea2611
  1. 19
      bin/block_maturity_dates.pl
  2. 6
      bin/weather
  3. 8
      config/.bash/aliases.bash
  4. 21
      config/.bashrc
  5. 7
      config/.gitconfig
  6. 10
      config/.vimrc

19
bin/block_maturity_dates.pl

@ -0,0 +1,19 @@
#!/usr/bin/perl
use strict;
use warnings;
use POSIX qw(strftime);
my $output = qx{./fiat/verus listtransactions |grep blockstomaturity | cut -d: -f2 | sed 's/,//g'};
my @lines = sort split /\n/, $output;
my $num = 1;
for my $line (@lines) {
chomp $line;
# my $date = localtime(time + 60*$line);
my $date = strftime "%a %b %e %H:%M:00 %Y", localtime(time + 60*$line);
print "$num $date\n";
$num++;
}
print "Total: $num immature blocks\n";

6
bin/weather

@ -5,10 +5,10 @@ use strict;
use Yahoo::Weather;
use Data::Dumper;
my $default_zip = 97222;
my $w = Yahoo::Weather->new;
my $default_zip = 99156;
my $w = Yahoo::Weather->new;
my $weather = $w->getWeatherByLocation(shift || $default_zip, 'f');
warn Dumper [ $w ];
my $city = $weather->{LocationDetails}{city};
my $region = $weather->{LocationDetails}{region};
my $current = $weather->{CurrentObservation};

8
config/.bash/aliases.bash

@ -56,11 +56,11 @@ function hexless(){
hexdump -C $1 |less -R
}
function tmpify() {
scp $@ leto@leto.net:~/public_html/tmp/
scp -P 4242 $@ leto@leto.net:~/public_html/tmp/
}
function screenssh () {
ssh -xtA $1 "/home/leto/bin/screen -D -R"
ssh -xtA $@ "\$HOME/bin/screen -D -R"
}
function git-spread () {
@ -103,7 +103,7 @@ function bt () {
./Build test --verbose 1 --test_files $1 |colortest
}
function t () {
prove -lrv $@ | colortest
prove -blrv $@ | colortest
# ./Build test --verbose 1 --test_files $@ |colortest
}
function modversion () {
@ -220,7 +220,7 @@ alias gdb_latest="run_match_latest.pl gdb"
alias xt="t xt/*"
alias tcover="./Build testcover --verbose 1 |colortest"
alias pb="perl Build.PL"
alias tlikenew="pb && ./Build clean && pb && cpanm --installdeps . && t"
alias tlikenew="pb && ./Build clean && pb && cpanm --installdeps . && ./Build && t"
alias mtlikenew="make clean; perl Makefile.PL && make && make test"
alias clean_build_check="tlikenew && ./Build dist && check_dist"
alias perlconfig="perl -e 'use Config;use Data::Dumper;print Dumper \%Config;'"

21
config/.bashrc

@ -14,19 +14,18 @@ export PG_PREFIX=$HOME/pg
export PGDATA=$PG_PREFIX/data
export PARROT=$HOME/git/parrot
export PATH=
export PATH=/home/leto/git/rakudo/parrot_install/bin:$PATH
export PATH=$PATH:/Users/jonathanleto/perl5/bin
export PATH=$PATH:$PARROT/installed_parrot/bin:$PARROT/tools/dev:/opt/local/bin
export PATH=$PATH:~/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/opt/local/sbin:/usr/bin:/usr/games:/opt/bin:/usr/local/sbin
export PATH=$PATH:/usr/X11R6/bin:$PGPREFIX/bin:~/svn/llvm/Debug/bin
export PATH=$HOME/pg/bin:/home/leto/local-lib/bin:$PATH
export PATH=$PATH:$HOME/.gem/ruby/1.8/bin
export PATH=$PATH:$HOME/android/sdk/tools
export PATH=$PATH:$HOME/.perl6/bin
export PATH=~/.cabal/bin:$PATH
export PATH=$PATH:/usr/texbin
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:$HOME/pg/lib:$HOME/lib:$HOME/git/rakudo/parrot_install/lib:$HOME/git/parrot/installed_parrot/lib
export PERL5LIB="$HOME/git/util/perl_lib:$HOME/perl5/lib/perl5"
export PERL5LIB="$HOME/git/util/perl_lib:$HOME/perl5/lib/perl5:$HOME/git/gg/subversion/site_perl/"
export GIT_COMMITTER_EMAIL=jonathan@leto.net
export GIT_COMMITTER_NAME='Jonathan "Duke" Leto'
@ -116,9 +115,6 @@ export up6='../../../../../..'
export up7='../../../../../../..'
export up8='../../../../../../../..'
# node.js version manager
NVM_DIR=$HOME/git/nvm
[ -e $NVM_DIR/nvm.sh ] && source $NVM_DIR/nvm.sh && nvm use
# this will pickup *.sh and *.bash
for f in ~/.bash/*sh; do
@ -128,9 +124,16 @@ done
# perlbrew
[ -e ~/perl5/perlbrew/etc/bashrc ] && source ~/perl5/perlbrew/etc/bashrc
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# http://seclists.org/fulldisclosure/2014/Nov/74
unset LESSOPEN
unset LESSCLOSE
PATH="/Users/jonathanleto/perl5/bin${PATH+:}${PATH}"; export PATH;
PERL5LIB="/Users/jonathanleto/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/Users/jonathanleto/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/Users/jonathanleto/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/Users/jonathanleto/perl5"; export PERL_MM_OPT;
export PATH=$PATH:~/Downloads/hush-1.0.9
source $HOME/git/hush/contrib/hush-cli.bash-completion

7
config/.gitconfig

@ -39,7 +39,6 @@
r = remote
sha1 = rev-parse
s = status
sup = !git stash && git svn rebase && git stash pop
staged = diff --cached
up = !git stash && git pull --rebase origin master && git stash pop
unstage= reset HEAD --
@ -52,6 +51,7 @@
unmerged = branch --no-merged
pull-all-submodules = submodule foreach "git checkout master && git pull origin master"
stash-all = stash save --include-untracked
[core]
excludesfile = ~/.gitignore_global
@ -115,9 +115,14 @@
stat = 1
[github]
user = leto
[merge]
conflictstyle = diff3
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[transfer]
fsckobjects = true

10
config/.vimrc

@ -10,6 +10,7 @@ set scrolloff=5
set title
set backspace=indent,eol,start
set clipboard=unnamed
set number
" recurse upward, looking for tags
@ -97,8 +98,10 @@ set esckeys
set tabstop=4
set shiftwidth=4
set shiftround
"set expandtab " soft tabs
set noexpandtab
set expandtab " soft tabs
"set noexpandtab
set ts=4
set shiftwidth=4
set ruler
set wildchar=<TAB>
set hlsearch
@ -137,6 +140,7 @@ nmap :ww :w!
nmap :X :x
nmap :xx :x!
nmap :Q :q
nmap :Set :set
nmap :E :e
nmap :qq :q!
map :syn :syntax on
@ -377,3 +381,5 @@ function! Tab_Or_Complete()
endif
endfunction
inoremap <Tab> <C-R>=Tab_Or_Complete()<CR>

Loading…
Cancel
Save