This file contains hidden or 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
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') | |
export CLUSTER_IP=$(kubectl get services/webapp1-clusterip-svc -o go-template='{{(index .spec.clusterIP)}}') | |
echo CLUSTER_IP=$CLUSTER_IP | |
curl $CLUSTER_IP:80 | |
sed -i 's/HOSTIP/172.17.0.16/g' externalip.yaml | |
export LoadBalancerIP=$(kubectl get services/webapp1-loadbalancer-svc -o go-template='{{(index .status.loadBalancer.ingress 0).ip}}') | |
echo LoadBalancerIP=$LoadBalancerIP |
This file contains hidden or 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
sed -i '' '/charset=latin1/d' ./not-appliable.sql |
This file contains hidden or 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
find . -name '*.js' -exec grep -i 'NPM_TOKE' {} \; -print |
This file contains hidden or 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
host = db.serverStatus().host; | |
prompt = function() { | |
return db+"@"+host+"$ "; | |
} | |
or to get the uptime and total number of documents | |
prompt = function() { | |
return "Uptime:"+db.serverStatus().uptime+" Documents:"+db.stats().objects+" > "; |
This file contains hidden or 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
sudo lsof -i :27017 # checks port 27017 |
This file contains hidden or 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
{ | |
"deviceId": "devA", | |
"etag": "AAAAAAAAAAc=", | |
"status": "enabled", | |
"statusReason": "provisioned", | |
"statusUpdateTime": "0001-01-01T00:00:00", | |
"connectionState": "connected", | |
"lastActivityTime": "2015-02-30T16:24:48.789Z", | |
"cloudToDeviceMessageCount": 0, | |
"authenticationType": "sas", |
This file contains hidden or 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
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: datadog-agent | |
spec: | |
template: | |
metadata: | |
labels: | |
app: datadog-agent | |
name: datadog-agent |
This file contains hidden or 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Parameters": { | |
"PrestoCoordinatorURL": { | |
"Description": "URL of the Presto Server. example: http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com:8889", | |
"Type": "String" | |
}, | |
"AirpalPort": { | |
"Description": "Airpal Port", | |
"Type": "String", |
This file contains hidden or 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
echo -n -e "\033]0;My Terminal Title\007" |
This file contains hidden or 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 tensorflow as tf | |
x = tf.constant(5, name='x') | |
y = tf.constant(8, name='y') | |
z = tf.Variable(2*x+3*y, name='z') | |
model = tf.global_variables_initializer() | |
with tf.Session() as sess: | |
write = tf.summary.FileWriter("./tf_logs", sess.graph) | |
sess.run(model) | |
print('z = ', sess.run(z) |