Skip to content

Instantly share code, notes, and snippets.

View amuraru's full-sized avatar
:octocat:
Focusing

Adrian Muraru amuraru

:octocat:
Focusing
View GitHub Profile
#!/bin/bash
if [[ "$1" == eth* ]]; then
echo "this part will be executed right after an interface is up."
# find out the ip
IP=$( ifconfig | grep "inet " | head -n 1 | awk '{print $2}' | awk 'BEGIN {FS = ":"} ; {print $2}' )
# delete the existing lines in the file
FQDN=`hostname`
HOSTNAME=`hostname -s`
sed -i "/${HOSTNAME}/d" /etc/hosts
@amuraru
amuraru / install_thrift.sh
Last active August 22, 2019 08:40 — forked from tscurtu/gist:3033705
install thrift 0.8.0
#/bin/bash
set -e
wget http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz
tar zxf thrift-0.8.0.tar.gz
pushd thrift-0.8.0
wget https://issues.apache.org/jira/secure/attachment/12511532/thrift-1465_1.patch
patch -p0 < thrift-1465_1.patch
wget https://issues.apache.org/jira/secure/attachment/12537024/THRIFT-1474-read-exceptions-first.patch