See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| package main | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/tls" | |
| "crypto/x509" | |
| "crypto/x509/pkix" | |
| "errors" | |
| "log" |
| // From https://github.com/golang/go/blob/c0547476f342665514904cf2581a62135d2366c3/src/net/http/server.go#L3223 | |
| // tcpKeepAliveListener sets TCP keep-alive timeouts on accepted | |
| // connections. It's used by ListenAndServe and ListenAndServeTLS so | |
| // dead TCP connections (e.g. closing laptop mid-download) eventually | |
| // go away. | |
| type tcpKeepAliveListener struct { | |
| *net.TCPListener | |
| } | |
| func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) { |
| WAYLAND_PROTOCOLS=/usr/share/wayland-protocols | |
| # wayland-scanner is a tool which generates C headers and rigging for Wayland | |
| # protocols, which are specified in XML. wlroots requires you to rig these up | |
| # to your build system yourself and provide them in the include path. | |
| xdg-shell-protocol.h: | |
| wayland-scanner server-header \ | |
| $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@ | |
| xdg-shell-protocol.c: xdg-shell-protocol.h |
| package main | |
| import ( | |
| "context" | |
| "crypto/sha256" | |
| "crypto/tls" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "errors" | |
| "fmt" |
| ;;; -*- lexical-binding: t; coding: utf-8; -*- | |
| (defun cam/-scroll-percentage () | |
| (/ (float (line-number-at-pos (window-start))) | |
| (float (line-number-at-pos (point-max))))) | |
| (defun cam/-set-window-start-to-percentage (scroll-percentage) | |
| (goto-char (point-min)) | |
| (let ((target-line-number (truncate (* (line-number-at-pos (point-max)) scroll-percentage)))) | |
| (forward-line (1- target-line-number))) |
| SUBSYSTEM=="video4linux", KERNEL=="video[0-9]*", ATTRS{product}=="C505e HD Webcam", ATTR{index}=="0", RUN+="/usr/bin/v4l2-ctl -d $devnode --set-ctrl=power_line_frequency=1" |
| # Change these variables as necessary. | |
| main_package_path = ./cmd/example | |
| binary_name = example | |
| # ==================================================================================== # | |
| # HELPERS | |
| # ==================================================================================== # | |
| ## help: print this help message | |
| .PHONY: help |