Here you can find a few examples of monitoring NATS Streaming channels:
sum(nss_chan_subs_pending_count{channel="foo"}) by (client_id)
| # Change these variables as necessary. | |
| main_package_path = ./cmd/example | |
| binary_name = example | |
| # ==================================================================================== # | |
| # HELPERS | |
| # ==================================================================================== # | |
| ## help: print this help message | |
| .PHONY: help |
| /* | |
| 'plugin:prettier/recommended' does the following: | |
| extends: ['prettier'], | |
| plugins: ['prettier'], | |
| rules: { | |
| 'prettier/prettier': 'error' | |
| } | |
| */ | |
| module.exports = { |
This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)
A very simple function to perform bulk SQL inserts, since WPDB doesn't provide one directly. The aim is for simplicity - both in the function itself, and in using it - rather than being a massive beast which covers all possible incorrect usage scenarios. Provide it with clean, consistent data, and it should hopefully be able to do what you want without issue.
Notes:
is_numeric())max_allowed_packet); you could pre-batch into smaller "safe" chunks if you need to handle this case - or just find a better way to insert such a large amount of data| import Foundation | |
| import WebKit | |
| final class WebCacheCleaner { | |
| class func clean() { | |
| HTTPCookieStorage.shared.removeCookies(since: Date.distantPast) | |
| print("[WebCacheCleaner] All cookies deleted") | |
| WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in |
WARNING: If you're reading this in 2021 or later, you're likely better served by reading:
(This gist was created in 2013 and targeted the legacy GOPATH mode.)
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |