Skip to content

Instantly share code, notes, and snippets.

View hung-doan's full-sized avatar

Hung Doan hung-doan

View GitHub Profile
@Riebart
Riebart / code_flows.md
Last active May 7, 2024 18:16
Thoughts on git branch workflows and microservice code organization

Comparing branching and workflow strategies

Summary of existing

There's several existing strategies for deploying and managing development work and release. They each have their own opinions, but roughly cover a few major situations:

  • Developing a new feature
  • Which branches should be, at all times, deployable, tested code
  • Under what conditions a code review or approval is required to merge code into a new branch
  • How many deployment environments (e.g. production only, or staging and production) you intend to have available, and to whom
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active April 15, 2025 09:32
Building a react native app in WSL2
@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active April 28, 2025 15:23
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@JamesMessinger
JamesMessinger / json-schema.js
Created July 27, 2017 19:21
Using JSON Schema in Postman (via an environment variable)
// Load the JSON Schema
const customerSchema = JSON.parse(environment.customerSchema);
// Test whether the response matches the schema
var customer = JSON.parse(responseBody);
tests["Customer is valid"] = tv4.validate(customer, customerSchema);
@NickCraver
NickCraver / TeamCity-Dev-Build-Log.txt
Created April 30, 2016 20:02
Stack Overflow Build Log Examples
Build 'Stack Exchange Network :: New York :: SENetwork - Dev' #21007
Started 'Wed Apr 27 23:54:04 UTC 2016' on 'NY-WEB05' by 'Git'
Finished 'Wed Apr 27 23:56:21 UTC 2016' with status 'NORMAL Success'
TeamCity URL https://build/viewLog.html?buildId=477326&buildTypeId=StackExchangeNetwork_NewYork_SENetworkDev
TeamCity server version is 9.1.5 (build 37377)
[23:54:03]i: TeamCity server version is 9.1.5 (build 37377)
[23:54:03]W: bt4 (2m:17s)
[23:54:03] : projectId:project55 projectExternalId:StackExchangeNetwork_NewYork buildTypeId:bt4 buildTypeExternalId:StackExchangeNetwork_NewYork_SENetworkDev
[23:54:03] : Collecting changes in 2 VCS roots (1s)
@NickCraver
NickCraver / Build.xml
Last active June 28, 2024 07:54
Stack Overflow Build Reference Docs
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="PrepareStaticContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Passed in Parameters -->
<configuration></configuration>
<workingDir></workingDir>
<buildNumber></buildNumber>
<buildViews>false</buildViews>
<minifyJs>true</minifyJs>
<TargetsDirectory></TargetsDirectory>
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 29, 2025 12:40
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@james2doyle
james2doyle / bootstrap-ckeditor-fix.js
Created January 7, 2016 19:05
A patch for using CKEditor inside a bootstrap modal. Fixed the issue with fields not focusing in the modal.
// bootstrap-ckeditor-fix.js
// hack to fix ckeditor/bootstrap compatiability bug when ckeditor appears in a bootstrap modal dialog
//
// Include this file AFTER both jQuery and bootstrap are loaded.
// http://ckeditor.com/comment/127719#comment-127719
$.fn.modal.Constructor.prototype.enforceFocus = function() {
modal_this = this
$(document).on('focusin.modal', function (e) {
if (modal_this.$element[0] !== e.target && !modal_this.$element.has(e.target).length
&& !$(e.target.parentNode).hasClass('cke_dialog_ui_input_select')
#!/bin/bash
set -e
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${THIS_SCRIPT_DIR}/.."
# Check if there's something uncommitted (don't release if there are files
# not yet committed)
set +e
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active December 29, 2024 07:04
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: