Skip to content

Instantly share code, notes, and snippets.

@alexedwards
alexedwards / Makefile
Last active November 13, 2024 19:29
Boilerplate Makefile for Go projects
# Change these variables as necessary.
main_package_path = ./cmd/example
binary_name = example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active November 18, 2024 13:47 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@thomasfr
thomasfr / mysqld.service
Created July 23, 2014 17:43
mysqld.service file for systemd
[Unit]
Description=MySQL Server
After=syslog.target
After=network.target
[Service]
Type=simple
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/run/mysqld
ExecStartPre=/bin/chown mysql:mysql -R /var/run/mysqld
301 https://github.com/zxdrive/imouto.host
@vvtommy
vvtommy / markdown_example.md
Created December 4, 2012 04:41
markdown语法示例

首先声名,这并不是一份完整的[Markdown][1]的语法介绍,需要看完整的介绍请点击[Markdown Syntax Documentation][2]。

本文的Markdown源代码可以至后台编辑文章进行查看,文章结尾也将以源代码的形式贴出

段落

一个段落是由一个或多个连续的行构成,段落间靠一个或以上视觉上的空行划分。一般的段落不应该用空格或制表符缩进

这是一个段落。它有两个句子。
@squarism
squarism / nginx.sh
Created August 20, 2012 03:33
Ubuntu 12.04 Nginx init.d script
#!/bin/bash
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@jwage
jwage / SplClassLoader.php
Last active August 16, 2024 17:36
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,