diff --git a/util/image/generate.go b/util/image/generate.go
index 81c69f7..9635b87 100644
--- a/util/image/generate.go
+++ b/util/image/generate.go
@@ -5,6 +5,7 @@ import (
"fmt"
"image"
"image/color"
+ "image/color/palette"
This file contains 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
# Example: git-ssh-key ~/path/to/identity-file git push origin master | |
git-ssh-key() { | |
ssh_key=${1:?Usage: git-ssh-key identity-file commands...} | |
shift | |
GIT_SSH_COMMAND=" \ | |
ssh -F /dev/null \ | |
-o IdentitiesOnly=yes \ | |
-o IdentityFile=\"$ssh_key\" \ | |
-o UserKnownHostsFile=/dev/null \ | |
-o StrictHostKeyChecking=no \ |
This file contains 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 ( | |
"encoding/binary" | |
"errors" | |
"fmt" | |
"io" | |
"os" | |
"strconv" | |
) |
This file contains 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
SCRIPT /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/scripts.vim | |
Sourced 1 time | |
Total time: 0.001107 | |
Self time: 0.001107 | |
count total (s) self (s) | |
" Vim support file to detect file types in scripts | |
" | |
" Maintainer: Bram Moolenaar <Bram@vim.org> | |
" Last change: 2018 Feb 03 |
This file contains 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
def skip_loop: | |
.input[.cursor:.cursor+1] as $c | | |
.cursor += 1 | | |
if $c == "[" then .depth += 1 | skip_loop | |
elif $c == "]" then .depth -= 1 | if .saved_depth > .depth then . else skip_loop end | |
elif $c == "" then error("unmatching loop") | |
else skip_loop | |
end; | |
def backward_loop: |
This file contains 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
{ source: ., depth: 0, indent: false, first_elem: false, output: "" } | | |
until( | |
.source == ""; | |
if .source[:1] | inside(" \t\n\r") then | |
.source |= .[1:] | |
else | |
.output += | |
(if .first_elem and (.source[:1] | inside("]}")) then "" | |
else (if .first_elem then "\n" else "" end) + | |
(if .indent then " " * .depth |
This file contains 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 ( | |
"errors" | |
"fmt" | |
"os" | |
) | |
type edge struct{ from, to int } |
This file contains 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 ( | |
"bytes" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"os" | |
"path/filepath" |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
int main(int argc, char const* argv[]) | |
{ | |
struct loadavg load; | |
size_t size = sizeof(load); | |
if (sysctlbyname("vm.loadavg", &load, &size, 0, 0) == -1) { |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
int main(int argc, char const* argv[]) | |
{ | |
struct xsw_usage swap; | |
size_t size = sizeof(swap); | |
if (sysctlbyname("vm.swapusage", &swap, &size, 0, 0) == -1) { |