Skip to content

Instantly share code, notes, and snippets.

View hung-doan's full-sized avatar

Hung Doan hung-doan

View GitHub Profile

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.
@hung-doan
hung-doan / rearct-native-app-in-wsl2.md
Created June 4, 2023 06:46 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@hung-doan
hung-doan / Publish Profile
Created November 18, 2019 09:41 — forked from patriksvensson/Publish Profile
Cake: Publish Profile
MSBuild("./src/MySolution.sln", settings =>
settings.WithProperty("DeployOnBuild", "true")
.WithProperty("PublishProfile", "profilename"));
@hung-doan
hung-doan / xerxes.c
Created December 17, 2016 12:06 — forked from Xe/xerxes.c
//Xerxes, code assumed to be public domain
//by tH3j3st3r
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <netdb.h>
#include <signal.h>
@hung-doan
hung-doan / xcode-build-bump.sh
Created May 22, 2016 17:21 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@hung-doan
hung-doan / TemplateHtmlHelper.cs
Created November 27, 2015 02:57 — forked from iamggreen/TemplateHtmlHelper.cs
Extension method to render ASP.NET MVC partial view to a string
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.IO;
using System.Collections.Concurrent;
using System.Text;
namespace PartialViewTemplatesSample