Skip to content

Instantly share code, notes, and snippets.

View tanchao90's full-sized avatar
🏀

TanChao tanchao90

🏀
View GitHub Profile
@jamiesun
jamiesun / daemon.py
Created July 12, 2012 10:20
一个python守护进程的例子
#! /usr/bin/env python2.7
#encoding:utf-8
#@description:一个python守护进程的例子
#@tags:python,daemon
import sys
import os
import time
import atexit
from signal import SIGTERM
@suziewong
suziewong / git.md
Last active September 30, 2024 08:18
Git的多账号如何处理? 1.同一台电脑多个git(不同网站的)账号 2.同一台电脑多个git(同一个网站的比如github的)多个账号

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22

host gitlab.zjut.com

@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 8, 2025 18:31
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 21, 2025 09:17
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.
@hellokaton
hellokaton / mac-multiple-version.md
Last active January 2, 2025 06:41
mac下多个jdk版本共存

修改系统环境变量,以自如的切换多个版本的 jdk

vi ~/.bash_profile 并填写下文内容
source ~/.bash_profile // 刷新环境变量
java -version // 查看当前的 jdk 版本

需要填写的内容为: