Skip to content

Instantly share code, notes, and snippets.

@marco-ostaska
marco-ostaska / teps_login.sh
Created November 20, 2018 01:28
Get ITM6 teps last login from TEPS Db2
#!/bin/ksh
. ~dbuser/sqllib/db2profile
db2 connect to TEPS
db2 "export to /tmp/users.del of del modified by chardel'' coldel@ decpt, select ID,NAME,LSTDATE from KFWUSER"
sed s/\'//g /tmp/users.del > /tmp/usersFMT.del
rm -f /tmp/users.del
HOSTNAME=`hostname`
echo "hostname,user ID, user name, last login mm-dd-yyy hh:mm:ss" > /tmp/lastlogin.csv
@marco-ostaska
marco-ostaska / vagrant-purge.sh
Last active August 11, 2018 17:21
This script was tested with centos 7 (still have some bugs in ubuntu). This is the script I use before packing my vagrant boxes
#!/bin/bash
#Check if it is ubuntu or centos
if [ -f /etc/os-release ]
then
. /etc/os-release
OS_NAME=`echo $NAME | awk '{print $1}' | tr '[:upper:]' '[:lower:]'`
else
echo "Unable to get os"
exit 1
@marco-ostaska
marco-ostaska / matplotib-barchart-showvalues.ipynb
Last active July 12, 2023 09:58
2 functions to show values and percent in matplotlib bar chart. Took me a while to figure out how to print values in barplot graphs.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.