Skip to content

Instantly share code, notes, and snippets.

View xujiajun's full-sized avatar
🎯
Focusing

徐佳军 xujiajun

🎯
Focusing
View GitHub Profile
@enricofoltran
enricofoltran / main.go
Last active April 6, 2025 09:48
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@peterhellberg
peterhellberg / graceful.go
Last active November 13, 2024 20:20
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active August 3, 2024 16:45
Laracasts PHPStorm theme.
@lidatui
lidatui / gist:6709851
Created September 26, 2013 04:25
修改git的用户名和邮箱
git config --global user.name "Your Name"
git config --global user.email [email protected]
全局的通过vim ~/.gitconfig来查看
git config user.name "Your Name"
git config user.email [email protected]
局部的通过当前路径下的 .git/config文件来查看
也可以修改提交的用户名和Email:
git commit --amend --author='Your Name <[email protected]>'
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 22, 2025 08:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.