Skip to content

Instantly share code, notes, and snippets.

@kireal
kireal / get_ports.sh
Created July 22, 2016 22:59
Get ports
#!/bin/sh
netstat -tanp | grep LISTEN
@kireal
kireal / informatica_logs
Created June 6, 2016 22:07
informatica_logs
MAPPING> DBG_21099 [2016-06-06 17:00:20.722] Default values: Output Row[0] going to transform [Task]
MAPPING> DBG_21056 [2016-06-06 17:00:20.722] column=[Id_OUT], defaultvalue=[ERROR('transformation')]
MAPPING> TE_7007 [2016-06-06 17:00:20.722] Transformation Evaluation Error [<<Expression Error>> [ERROR]: transformation
... nl:ERROR(u:'transformation')]
MAPPING> DBG_21367 [2016-06-06 17:00:20.722] Note: Output column [Id_OUT] has no default value. Row will be skipped if transformation errors are encountered
MAPPING> DBG_21056 [2016-06-06 17:00:20.722] column=[WhoId_OUT], defaultvalue=[ERROR('transformation')]
MAPPING> TE_7007 [2016-06-06 17:00:20.722] Transformation Evaluation Error [<<Expression Error>> [ERROR]: transformation
... nl:ERROR(u:'transformation')]
MAPPING> DBG_21367 [2016-06-06 17:00:20.722] Note: Output column [WhoId_OUT] has no default value. Row will be skipped if transformation errors are encountered
MAPPING> DBG_21056 [2016-06-06 17:00:20.722] column=[WhatId_OUT], defaultvalue=[E
@kireal
kireal / openvpn.conf
Created April 17, 2016 02:50
Option to push all traffic via tunnel
redirect-gateway def1
@kireal
kireal / pip_upgrade_all.sh
Created April 11, 2016 02:14
sh command which upgrades all pip packages
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
@kireal
kireal / aix_kernel_params.sh
Created November 27, 2015 09:19
Get all AIX tunnable parameters
#!/bin/sh
for i in `lsdev | egrep hdisk[0-9*] | awk '{print $1}'`; do echo -====== $i ======-; lsattr -El $i; done >> ~/gbc_result.txt
for i in `lsdev | egrep fcs[0-9*] | awk '{print $1}'`; do echo -====== $i ======-; lsattr -El $i; done >> ~/gbc_result.txt
for i in `lsdev | egrep vscsi[0-9*] | awk '{print $1}'`; do echo -====== $i ======-; lsattr -El $i; done >> ~/gbc_result.txt
echo -======= tunables ======- >> ~/gbc_result.txt
cat /etc/tunables/lastboot >> ~/gbc_result.txt
@kireal
kireal / docker_mac_parallels
Last active November 14, 2015 10:41
How to create docker toolbox machine in parallels vm
#!/bin/sh
# get parallels driver
curl -L https://github.com/Parallels/docker-machine-parallels/releases/download/v1.0.0/docker-machine-driver-parallels > /usr/local/bin/docker-machine-driver-parallels
# set exec bit
chmod +x /usr/local/bin/docker-machine-driver-parallels
# create parallels docker machine
docker-machine create --driver=parallels prl-dev
@kireal
kireal / clean_cdh_logs.sh
Created November 6, 2015 11:43
Clean CDH logs files
#!/bin/sh
find /var/log/ -type f -mtime +3 -name "*log*" -delete
find /var/log/ -type f -mtime +3 -name "*log" -delete
@kireal
kireal / brew_reset
Created October 9, 2015 11:47
Reset brew repository
cd $(brew --repository)
git reset --hard FETCH_HEAD
@kireal
kireal / thread_number.sh
Created September 18, 2015 19:53
sum thread number linux
ps -eo nlwp | tail -n +2 | awk '{ num_threads += $1 } END { print num_threads }'
@kireal
kireal / delete_elastic_index.sh
Created September 18, 2015 14:33
Delete elasticsearch index data
curl -XDELETE 'localhost:9200/logstash-2015.09.09'