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 / rideOnboarding.dart
Last active May 6, 2020 13:47
A ride onboarding screen
import 'dart:math' as math;
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
main() {
runApp(MaterialApp(
theme: ThemeData(
primaryColor: Colors.black,
primaryColorLight: Colors.white,
@sangdongvan
sangdongvan / sliver_single_box.dart
Last active April 27, 2020 15:46
Custom Scrollview with single box
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
body: SliverMultiBoxDemo(),
),
@sangdongvan
sangdongvan / main.dart
Last active February 27, 2024 13:20
Dock layout
import 'dart:math';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'dart:ui';
void main() {
runApp(MyHomePage());
}
class MyHomePage extends StatefulWidget {
@sangdongvan
sangdongvan / docker-utils.sh
Created September 4, 2019 04:22
Sample docker commands to build image on CI machine
# ----------------------------------------------------------------------------
# Git Utilities to get the current git branch and last commit
# ----------------------------------------------------------------------------
# checks if branch has something pending
function _git_dirty() {
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*"
}
# gets the current git branch
@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
@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
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 / 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

@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