Skip to content

Instantly share code, notes, and snippets.

View samloh84's full-sized avatar

Samuel Loh Yin Kang samloh84

View GitHub Profile
@samloh84
samloh84 / openam-master.DeploymentConfig.yaml
Created June 27, 2017 09:24
OpenAM Openshift Configuration files
kind: "DeploymentConfig"
apiVersion: "v1"
metadata:
name: "openam-master"
spec:
replicas: 1
selector:
app: "openam-master"
template:
metadata:
@samloh84
samloh84 / TLS Cipher Suite.txt
Created July 13, 2017 06:54
TLS Cipher Suite.txt
# https://www.feistyduck.com/library/openssl-cookbook
ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-ECDSA-AES128-SHA
ECDHE-ECDSA-AES256-SHA
ECDHE-ECDSA-AES128-SHA256
ECDHE-ECDSA-AES256-SHA384
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-RSA-AES128-SHA
@samloh84
samloh84 / install-master.md
Created July 27, 2018 06:57 — forked from hunter/install-master.md
Install Kube on CoreOS

Install Kubernetes Master

Master:

On the Master run the following commands. They will install the prereqs for Kubernetes

sudo su -

# Enable Docker
[root@docker kubernetes-aws-playbook]# kubectl log rook-ceph-operator-6cf857bfbf-xfhwj -n rook-ceph-system
log is DEPRECATED and will be removed in a future version. Use logs instead.
2018-09-06 10:15:07.662919 I | rookcmd: starting Rook v0.8.1 with arguments '/usr/local/bin/rook ceph operator'
2018-09-06 10:15:07.663026 I | rookcmd: flag values: --help=false, --log-level=INFO, --mon-healthcheck-interval=45s, --mon-out-timeout=5m0s
2018-09-06 10:15:07.664651 I | cephcmd: starting operator
2018-09-06 10:15:08.282608 I | op-agent: getting flexvolume dir path from FLEXVOLUME_DIR_PATH env var
2018-09-06 10:15:08.282641 I | op-agent: discovered flexvolume dir path from source env var. value: /var/lib/kubelet/volumeplugins
2018-09-06 10:15:08.383146 I | op-agent: rook-ceph-agent daemonset started
2018-09-06 10:15:08.459821 I | op-discover: rook-discover daemonset started
2018-09-06 10:15:08.463763 I | operator: rook-provisioner ceph.rook.io/block started using ceph.rook.io flex vendor dir
#!/bin/bash
sudo yum remove -y docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
#!/bin/bash
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
@samloh84
samloh84 / latest_centos_ami.tf
Created April 29, 2019 01:51
Terraform gists
// Find latest Centos AMI
data "aws_ami" "centos" {
most_recent = true
executable_users = [
"self"]
filter {
name = "product-code"
values = [
"aw0evgkw8e5c1q413zgy5pjce"]
@samloh84
samloh84 / index.html
Created May 2, 2019 13:00
Monaco Editor
<!doctype html>
<html lang="en">
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.16.2/min/vs/editor/editor.main.css"
rel="stylesheet">
<style>
#container {
width: 90%;
height: 800px;
margin-left: auto;
@samloh84
samloh84 / docker.sh
Created May 13, 2019 01:33
Docker Utility Script
#!/bin/bash
DOCKER_MACHINE_NAME=${DOCKER_MACHINE_NAME:-default}
DOCKER_REGISTRY_NAMES=${DOCKER_REGISTRY_NAMES:-}
DOCKER_IMAGE_NAMES=${DOCKER_IMAGE_NAMES:-$(basename ${PWD})}
DOCKER_IMAGE_TAGS=${DOCKER_IMAGE_TAGS:-latest}
DOCKER_RUN_WORKING_DIRECTORY=${DOCKER_RUN_WORKING_DIRECTORY:-/usr/src/app}
@samloh84
samloh84 / ssh-agent.sh
Created May 24, 2019 03:01
SSH Agent Startup Script
#!/bin/bash
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo -e "You should run the following command:\nsource bin/${0}"
exit 1
fi
PRIVATE_KEYS=$(grep -l -r "\\-\\+BEGIN [[:alpha:]]\+ PRIVATE KEY\\-\\+" ${HOME}/.ssh)
eval $(ssh-agent)