Skip to content

Instantly share code, notes, and snippets.

View rpsene's full-sized avatar
👨‍💻

Rafael Sene rpsene

👨‍💻
View GitHub Profile
## Get API URL
oc cluster-info | grep -E 'Kubernetes master|Kubernetes control plane' | awk '/http/ {print $NF}'
output: https://api.ocp-46-20210119-145312-23b3a025d7.158.175.162.14.nip.io:6443
## Get CA certificate
oc get secrets
@rpsene
rpsene / pretty-printing-multipath
Created July 21, 2020 14:59
A simple way to get only the name and size of multipath devices.
multipath -ll | sed -n '/^mpath/,/^size/p' >> /tmp/mpath.log && x=1 && while IFS="" read -r p || [ -n "$p" ]; do STR1=$(printf '%s\n' "$p" | sed 's/\s.*$//'); STR2+=$STR1" "; y=$(($x % 2)); if [ $y -eq 0 ]; then printf '%s\n' "$STR2"; echo "---"; STR2=""; fi; x=$(( $x + 1 )); done < /tmp/mpath.log; rm -f /tmp/mpath.log; touch /tmp/mpath.log;
1 - nvidia-docker run -it --env LICENSE=yes -p <PORT>:<PORT>/tcp ibmcom/powerai:1.6.0.all bash
2 - python -c "import torch;print(torch.__version__)"
3 - python -c "import tensorflow as tf;print(tf.__version__)"
4 - conda install -y git jupyter matplotlib
5 - git clone https://github.com/pvaneck/tf_mnist
1 - nvidia-docker run -it --env LICENSE=yes -p <PORT>:<PORT>/tcp ibmcom/powerai:1.6.0.all bash
2 - python -c "import torch;print(torch.__version__)"
3 - python -c "import tensorflow as tf;print(tf.__version__)"
4 - conda install -y git jupyter matplotlib
5 - git clone https://github.com/pvaneck/tf_mnist
nvidia-docker run -it --env LICENSE=yes -p <PORT>:<PORT>/tcp ibmcom/powerai:1.6.0-all bash
python -c "import torch;print(torch.__version__)"
python -c "import tensorflow as tf;print(tf.__version__)"
conda install -y git jupyter matplotlib
git clone https://github.com/pvaneck/tf_mnist
@rpsene
rpsene / googleforms2slack.gs
Created May 9, 2017 03:19 — forked from andychase/googleforms2slack.gs
Google Forms Slack Notification
// Google Forms Slack Notification
// Andy Chase <github.com/andychase>
// License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0>
// Install 1: This code goes in ( tools > script editor... ) of your google docs form
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] )
// Setup 1: Put your slack api url below
var POST_URL = "https://hooks.slack.com/services/";
function onSubmit(e) {
@rpsene
rpsene / .screenrc
Last active April 27, 2017 15:03 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= Kd} %{= Kd}%-w%{= Kr}[%{= KW}%n %t%{= Kr}]%{= Kd}%+w %-= %{KG} %H%{KW}|%{KY}%101`%{KW}|%D %M %d %Y%{= Kc} %C%A%{-}'
# huge scrollback buffer
defscrollback 50000
# scroll
termcapinfo xterm* ti@:te@

Keybase proof

I hereby claim:

  • I am rpsene on github.
  • I am rpsene (https://keybase.io/rpsene) on keybase.
  • I have a public key whose fingerprint is 33C4 6492 26AE 9A0C 5444 7B8E E35F BC63 5C44 5BEC

To claim this, I am signing this object: