This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd "$(brew --repo homebrew/core)" | |
brew unlink kubernetes-helm | |
vi Formula/kubernetes-helm.rb | |
# change following lines for 2.6.1 | |
:tag => "v2.6.1", | |
:revision => "bbc1f71dc03afc5f00c6ac84b9308f8ecb4f39ac" | |
.... | |
sha256 "a030c0ea9f980cdd4523b4cab0f013bec529ce6225117492c55a924871163bb7" => :high_sierra | |
HOMEBREW_NO_AUTO_UPDATE=1 brew install kubernetes-helm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps -ef | grep run | grep -v grep| grep airflow | awk '{print $2}' | xargs kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_cmd = ['cat'] + input_files | |
with open('myfile', "w") as outfile: | |
subprocess.call(my_cmd, stdout=outfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix java for R | |
R CMD javareconf | |
ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Example task only run for hosts in the group vagrant | |
debug: msg="I'm a vagrant box" | |
when: "vagrant" in group_names | |
- name: Example task only run for hosts *not* in the group vagrant | |
debug: msg="I'm not in the vagrant group.. sad panda :(" | |
when: "vagrant" not in group_names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SshSensorOperator(SSHExecuteOperator, BaseSensorOperator): | |
""" | |
Wait for some ssh command to succeed. | |
""" | |
count = 0 | |
def poke(self, context): | |
""" | |
Function that checks for ssh command. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beeline -u "$KETL_JDBC_HIVE_URI" --hivevar bla=1 --hivevar ketl_env="${KETL_ENV}" -e "select 'hi\${hivevar:bla}: \${hivevar:ketl_env}';" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add jython as virtualenv on Mac | |
brew install jython | |
virtualenv -p /usr/local/bin/jython jython-env --no-setuptools | |
. ./jython-env/bin/activate | |
wget https://bootstrap.pypa.io/ez_setup.py | |
python ez_setup.py --insecure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set echo off | |
set embedded on | |
set feedback off | |
set heading off | |
set linesize 2000 | |
set pages 0 | |
set recsep off | |
set termout off | |
set trim on | |
set trimspool on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
process = subprocess.Popen(["nslookup", "www.google.com"], stdout=subprocess.PIPE) | |
output = process.communicate()[0].split('\n') | |
ip_arr = [] | |
for data in output: | |
if 'Address' in data: | |
ip_arr.append(data.replace('Address: ','')) |
NewerOlder