Skip to content

Instantly share code, notes, and snippets.

View sangdongvan's full-sized avatar
🎯
Focusing

Sang Dong sangdongvan

🎯
Focusing
  • AgilityIO
  • Vietnam
View GitHub Profile
@sangdongvan
sangdongvan / cloudSettings
Last active January 21, 2020 08:03
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-01-21T08:02:59.871Z","extensionVersion":"v3.4.3"}
@sangdongvan
sangdongvan / .hyper.js
Last active February 28, 2020 06:43
My personal .hyper.js config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
hypercwd: {
initialWorkingDirectory: '~/code'
},
stale_while_revalidate_seconds = settings.FRONTEND_CACHE_TIMEOUT / 2
three_days_in_seconds = 60 * 60 * 24 * 3
extra_cache_control_headers = {
'stale-while-revalidate=%s' % stale_while_revalidate_seconds,
'stale-if-error=%s' % three_days_in_seconds,
}
patch_cache_control(response, **extra_cache_control_headers)
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
@sangdongvan
sangdongvan / postInstall.sh
Created April 19, 2019 02:41
ubuntu check and create group/user
#!/bin/sh
# ubuntu
# check that owner group exists
if [ -z `getent group spinnaker` ]; then
groupadd spinnaker
fi
# check that user exists
if [ -z `getent passwd spinnaker` ]; then
@sangdongvan
sangdongvan / Emacs.md
Created May 2, 2019 12:39 — forked from redinger/Emacs.md
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds

AWSTemplateFormatVersion: 2010-09-09
Conditions:
CreateCodeBuildResources: !Equals
- true
- true
CreateWebSiteS3Bucket: !Equals
- false
- true
Description: A Java Spring web service deployed to AWS Lambda.
Metadata:
@sangdongvan
sangdongvan / docker-compose.yaml
Created June 13, 2019 07:40
docker-compose CIRD sample
networks:
default:
ipam:
driver: default
config:
- subnet: 172.20.0.0/16
ip_range: 172.20.1.0/24
gateway: 172.20.1.1
@sangdongvan
sangdongvan / kinesis-analytics-taxi-consumer-infrastructure.yml
Created July 11, 2019 02:42
excerpt CF setup a flink job in Kinesis Analytics service
KinesisAnalyticsFlinkApplication:
Type: AWS::KinesisAnalyticsV2::Application
Properties:
RuntimeEnvironment: FLINK-1_6
ServiceExecutionRole: !Sub ${KinesisAnalyticsServiceRole.Arn}
ApplicationConfiguration:
ApplicationCodeConfiguration:
CodeContent:
S3ContentLocation:
BucketARN: !Ref FlinkApplicationS3BucketArn