Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ socat -d -d pty,raw,echo=0 pty,raw,echo=0 | |
| 2020/10/24 10:44:43 socat[786] N PTY is /dev/pts/16 | |
| 2020/10/24 10:44:43 socat[786] N PTY is /dev/pts/17 | |
| 2020/10/24 10:44:43 socat[786] N starting data transfer loop with FDs [5,5] and [7,7] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const c = @cImport({ | |
| @cInclude("linux/can.h"); | |
| }); | |
| const page_allocator = std.heap.page_allocator; | |
| const Allocator = std.mem.Allocator; | |
| const can_frame = extern struct { | |
| can_id: u32, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // An NNG version which does work | |
| // What's different between this and the Go version? | |
| #include <unistd.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <nng/nng.h> | |
| #include <nng/protocol/reqrep0/rep.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let reverse lst' = | |
| let rec rev acc = function | |
| | [] -> acc | |
| | head::tail -> rev (head::acc) tail | |
| rev [] lst' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // go run main.go | |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "net" | |
| "os" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "time" | |
| ) | |
| func listen(end chan<- bool) { |