Skip to content

Instantly share code, notes, and snippets.

@vdm
vdm / gist:c77ee63a143424ba5567
Created May 8, 2014 15:57
sun-jdk7 blob dependency bug?
lang/sun-jdk7]# bmake -dA install
[...]
*** Failed target: /content/distfiles/jdk-7u51-solaris-i586.tar.gz
*** Failed command: test ! -f /content/distfiles/jdk-7u51-solaris-i586.tar.gz || exit 0; echo 1>&2 "ERROR:" "======================================================================"; echo 1>&2 "ERROR:" ""; for line in " The file jdk-7u51-solaris-x64.tar.gz containing Java Development Kit (JDK) 7u51" "" " must be fetched into:" " /content/distfiles/jdk-7u51-solaris-x64.tar.gz" " from:" " http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html" " or http://www.oracle.com/technetwork/java/javase/archive-139210.html" "" " Click Download for 'Java Development Kit (JDK) 7u51', read and accept the" " license, then choose 'solaris tar.gz file'."; do echo 1>&2 "ERROR:" "$line"; done; echo 1>&2 "ERROR:" ""; echo 1>&2 "ERROR:" "======================================================================"; exit 1
*** Error code 1
Stop.
bmake: stopped in /content/pkgsrc/lang/sun-jdk7
Global:.ERROR_TA
@vdm
vdm / gist:fef7ad831e0395e581e9
Created May 27, 2014 16:34
postgresql93-9.3.4 setproject: No such process
# pkgin in postgresql93-9.3.4
[...]
pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
updating database: 100%
marking postgresql93-9.3.4 as non auto-removable
# /usr/sbin/svcadm enable svc:/pkgsrc/postgresql:default
# svcs -xv
svc:/pkgsrc/postgresql:default (PostgreSQL RDBMS)
@vdm
vdm / ixgbevf-upgrade.sh
Last active November 28, 2019 21:35
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
ssh [email protected] "bash -s -x" -- <ixgbevf-upgrade.sh

Keybase proof

I hereby claim:

  • I am vdm on github.
  • I am vdm (https://keybase.io/vdm) on keybase.
  • I have a public key ASAyFJiVNTfbX-LeffIhDPGxqB5x6m7bl4r-b84QBMyOYwo

To claim this, I am signing this object:

@vdm
vdm / README.md
Created July 19, 2023 14:01
Serial console resizing

Unlike ssh, serial consoles like virsh console don’t receive SIGWINCH and so instead of resizing they stay stuck at 80x24, making line wrapping, tab completion, curses and reading in a pager difficult.

So get the terminal size from the outside bash shell, and set the same values manually within the serial console:

host$ echo $LINES $COLUMNS
182 92
host$ sudo virsh console guest
guest$ stty rows 182 cols 92
@vdm
vdm / gist:0953fa9de17fcef171409e067010c615
Created November 20, 2023 18:05
terminal-width ruler
$ echo $COLUMNS
80
$ eval printf '=%.0s' {1..$COLUMNS}; echo
================================================================================
$ eval printf -- '-%.0s' {1..$COLUMNS}; echo
--------------------------------------------------------------------------------
@vdm
vdm / gist:ea3cada07dbb2be68b33c364d0fe6fca
Last active November 23, 2023 11:55
Import key from agent to EC2
$ aws --version
aws-cli/2.11.21
$ aws ec2 import-key-pair --public-key-material "$(ssh-add -L)" --key-name $USER
Invalid base64:
$ aws --cli-binary-format raw-in-base64-out ec2 import-key-pair --public-key-material "$(ssh-add -L)" --key-name $USER
@vdm
vdm / gist:673530a219fe92536010afd121954f90
Last active June 28, 2024 16:09
Show config across .d directories without comment or blank lines
tail -n+1 $(find /etc/logrotate* -type f) | grep -vE '^(#|$)'
tail -n+1 $(find /etc/rsyslog* -type f) | perl -ne 'print if !/^(\s*#|$)'
sudo bash -c 'tail -n+1 $(find /{etc,var/spool}/cron* -type f)' | grep -vE '^(#|$)'
@vdm
vdm / gist:94966cea0479fbb09004f506386dcd01
Created June 28, 2024 16:06
Show process cmdlines tree without [kthreadd] kernel threads
ps f -N --ppid 2