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
#include<SoftwareSerial.h> | |
SoftwareSerial client(2,3); | |
String reading="{ \" : 1, \"latitude\" : 12.983027, \"longitude\" : 80.2594, \"timestamp\" : 100, }"; | |
void setup() | |
{ | |
Serial.begin(9600); |
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
#!/bin/bash | |
# options: | |
# remove stopped containers and untagged images | |
# $ dkcleanup | |
# remove all stopped|running containers and untagged images | |
# $ dkcleanup --reset | |
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag} | |
# pattern and untagged images | |
# $ dkcleanup --purge {image} |
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
#!/bin/bash | |
export KUBECONFIG=$HOME/.kube/config | |
#Download an OSX binary minikube | |
# minikube-darwin-amd64 | |
# | |
# https://github.com/kubernetes/minikube/releases | |
# Put it somewhere that you can run it from: /usr/local/bin/minikube && chmod +x /usr/local/bin/minikube | |
# Download Docker Machine Hyperkit Driver |
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
var aws = require('aws-sdk'), | |
https = require('https'), | |
zlib = require('zlib'); | |
util = require('util'); | |
// If you've used KMS to encrypt your slack, insert your CiphertextBlob here | |
var ENCRYPTED_URL = 'AQEC1423...'; | |
// IF NOT, you can take the risk to insert your Slack URL here | |
// e.g. '/services/QWERTY/ASDFGHJ/zxYTinNLK'; |
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: Deployment | |
metadata: | |
labels: | |
app: splunk | |
name: splunk | |
spec: | |
replicas: 1 | |
selector: |
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 boto3 | |
import datetime | |
import time | |
# AWS Client>> | |
profile = 'some-profile' | |
boto3.setup_default_session(profile_name=profile) | |
client = boto3.client('iam') | |
# Array of users |
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
package com.gyoung.auto.jwt.demo; | |
import java.io.IOException; | |
import java.security.KeyPairGenerator; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.interfaces.RSAPrivateKey; | |
import java.security.interfaces.RSAPublicKey; | |
import java.util.Date; | |
import org.bouncycastle.util.encoders.Base64; |
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
#!/usr/bin/env bash | |
# run local script functions remotely | |
function remote::run() { | |
# usage: remote::run "host" "includes" "commands" | |
# where "includes" is a list of functions to export to | |
# the remote host | |
[[ -n "$2" ]] && includes="$(declare -f $2);" | |
ssh -q -T $1 "$includes $3" | |
} |
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
#!/bin/bash | |
curl -s https://{some tenanant}.{some environment}.verygoodproxy.com/post \ | |
-H "Content-type: application/json" \ | |
-d '{"CCN": "'$1'"}' | jq --raw-output '.data' | jq --raw-output .CCN | |
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
########################################################################## | |
# clone-rds-db.sh | |
# | |
# Usage: | |
# ./clone-rds-db.sh [instance_name] | |
# | |
# Creates a new RDS instance by cloning the latest production snapshot. | |
# More specifically, the following steps are performed: | |
# - Determine the snapshot id to use |