Skip to content

Instantly share code, notes, and snippets.

View sblack4's full-sized avatar
:shipit:
taking care of business

Steven B sblack4

:shipit:
taking care of business
View GitHub Profile
@sblack4
sblack4 / ceasarCipher.py
Created June 6, 2017 01:51
gets a word from the command line and decodes it using a ceasar cipher
import sys, string
def getDecodedLetter(encoded, n):
position = string.ascii_lowercase.index(encoded)
return string.ascii_lowercase[(position + n) % 26]
def getDecodedWord(word, n):
decodedWord = ""
for letter in word:
decodedWord += getDecodedLetter(letter, n)
@sblack4
sblack4 / .ssh-config
Created September 6, 2017 19:16
my standard ssh config file (~/.ssh/config)
# for all hosts
Host *
# number of seconds between null packets
ServerAliveInterval 60
# number of null packets to try before disconnecting
ServerAliveCountMax 10
@sblack4
sblack4 / portForward.sh
Created September 21, 2017 21:32
port forwarding
ssh \
-i ~/keys/privateKey \
-L 1521:129.158.64.112:1521 \
opc@129.158.64.112 \
-o "ProxyCommand=/usr/bin/nc -X connect -x www-proxy-brmdc.us.oracle.com:80 %h %p"
@sblack4
sblack4 / ambari_api_bulk_service_checks.md
Created October 20, 2017 14:56 — forked from mr-jstraub/ambari_api_bulk_service_checks.md
Ambari API - Run all Service Checks

#Ambari API - Run all Service Checks In order to check the status and stability of your cluster it makes sense to run the service checks that are included in Ambari. Usually each Ambari Service provides its own service check, but their might be services that wont include any service check at all. To run a service check you have to select the service (e.g. HDFS) in Ambari and click "Run Service Check" in the "Actions" dropdown menu.

Service Checks can be started via the Ambari API and it is also possible to start all available service checks with a single API command. To bulk run these checks it is necessary to use the same API/method that is used to trigger a rolling restart of Datanodes (request_schedules). The "request_schedules" API starts all defined commands in the specified order, its even possible to specify a pause between the commands.

Available Service Checks:

Service Name service_name Command
HDFS HDFS HDFS_SERVICE_CHECK
@sblack4
sblack4 / zeppelin.sh
Created January 18, 2018 16:21
EzZeppelin
# instead of installing zeppeling on your client
# or deploying another host
# just pull the docker container
docker run -p 8080:8080 --rm -v ./logs:/logs -v ./notebook:/notebook -e ZEPPELIN_LOG_DIR='/logs' -e ZEPPELIN_NOTEBOOK_DIR='/notebook' --name zeppelin apache/zeppelin:0.7.3
@sblack4
sblack4 / anchorHeaders.js
Created January 19, 2018 15:37
add github flavored heading anchors
// Hack to make intra-page links work
// replaces id's after angular strips them out
/**
* Given a Node, returns a
* GitHub flavored heading anchor
* @param {Node}
* @returns {string}
*/
function getHeadingAnchor(domNode) {
@sblack4
sblack4 / .gitignore
Last active February 26, 2018 21:13
Spark-twitter stuff for POC
config.py
.vscode
*.pyc
*.jar
@sblack4
sblack4 / CATCH_Keras_RL.md
Created April 11, 2018 20:43 — forked from EderSantana/CATCH_Keras_RL.md
Keras plays catch - a single file Reinforcement Learning example
@sblack4
sblack4 / .bash_profile
Last active May 7, 2018 21:23
dotfiles
# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
alias l='ls -ahl'
alias la='ls -a'
alias ll='ls -hl'
alias open="explorer "
#
@sblack4
sblack4 / CHANGELOG.md
Created May 14, 2018 22:41
opinionated changelog template - CHANGELOG.md

changelog

https://keepachangelog.com/en/1.0.0/

A change log is kind of like a diary for contributers. In particular, it records:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.