My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
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 ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "regexp" | |
| "time" | |
| ) |
#awesome-go
A curated list of awesome Go frameworks, libraries and software.
- golang/go - The Go programming language
- kubernetes/kubernetes - Production-Grade Container Scheduling and Management
- avelino/awesome-go - A curated list of awesome Go frameworks, libraries and software
- gogits/gogs - Gogs is a painless self-hosted Git service.
- syncthing/syncthing - Open Source Continuous File Synchronization
- grafana/grafana - The tool for beautiful monitoring and metric analytics & dashboards for Graphite, InfluxDB & Prometheus & More
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
| // NestedMapLookup implementation and usage example | |
| // Run it at https://play.golang.org/p/VHRgMcLf0b1 | |
| // | |
| // JSON is not required, but used to show the example in a "real" setting. | |
| // | |
| // This gist is copyright (c) 2018 Brightgate Inc. | |
| // and licensed under the Creative Commons Attribution 4.0 International license | |
| // https://creativecommons.org/licenses/by/4.0/legalcode | |
| // |
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 func() { | |
| for { | |
| err = rmq.Stream(cancelCtx) | |
| if errors.Is(err, rabbitmq.ErrDisconnected) { | |
| continue | |
| } | |
| break | |
| } | |
| }() |
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
| <advancedsettings> | |
| <video> <!-- Stop XBMC indexing some unwanted common items --> | |
| <excludetvshowsfromscan action="prepend"> | |
| <regexp>(?i)sample</regexp> <!-- Greedy, whole path, case insensitive ignore --> | |
| <regexp>(?i)uTorrentPartFile</regexp> <!-- Ignore common scrap files --> | |
| <regexp>[\/\\][sS]pecials?[\/\\]</regexp> | |
| <regexp>[\/\\][Ee]xtras?[\/\\]</regexp> | |
| <regexp>(?i)[\. \-_](?:nc)?(?:op|ed|sp|pv)[\. \-_\(\[\d]</regexp> | |
| </excludetvshowsfromscan> | |
| </video> |
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
| <!-- General Settings --> | |
| <advancedsettings> | |
| <loglevel hide="true">-1</loglevel> <!-- Comment: Disables logging --> | |
| <playcountminimumpercent>95</playcountminimumpercent> | |
| <skiploopfilter>0</skiploopfilter> <!-- Comment: For RPi or similar use 16 or higher (low CPU usage) --> | |
| <nodvdrom>true</nodvdrom> | |
| <!-- MySQL Library --> | |
| <videodatabase> | |
| <type>mysql</type> |
TL;DR You can't set those for an image during build time becasue Docker takes the
sysctlconfiguration from the Host. So, set the config on your host machine.
As in this
link, to increase the maximum watchers, we need set fs.inotify.max_user_watches
to a higher number in /etc/sysctl.conf.
- macOS 10.15.5
- tmux 3.1b
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):