Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
coding

Jorge Luis Betancourt jorgelbg

:octocat:
coding
View GitHub Profile
View coordinator.yml
listenAddress:
type: "config"
value: "0.0.0.0:7201"
metrics:
scope:
prefix: "coordinator"
prometheus:
handlerPath: /metrics
listenAddress: 0.0.0.0:7203 # until https://github.com/m3db/m3/issues/682 is resolved
View m3-stdout.log
2019-03-26T12:55:14.309Z INFO tracing disabled; set `tracing.backend` to enable
12:55:14.310934[I] resolving seed node configuration [{hostID m3db_local} {seedNodeHostIDs [m3db_local]}]
12:55:14.310961[I] seed node, starting etcd server
2019-03-26T12:55:14.382Z INFO resolved cluster namespace {"namespace": "default"}
2019-03-26T12:55:14.805Z INFO no m3msg server configured
2019-03-26T12:55:14.805Z INFO starting server {"address": "0.0.0.0:7201"}
12:55:14.927798[W] max index query IDs concurrency was not set, falling back to default value
12:55:14.928240[W] host doesn't support HugeTLB, proceeding without it
12:55:14.963796[I] bytes pool registering bucket capacity=842356182384, size=842356182392, refillLowWatermark=%!f(*float64=0x242a4d8), refillHighWatermark=%!f(*float64=0x242a4d0)
12:55:14.963837[I] bytes pool registering bucket capacity=842356182400, size=842356182408, refillLowWatermark=%!f(*float64=0x242a4d8), refillHighWatermark=%!f(*float64=0x242a4d0)
@jorgelbg
jorgelbg / full-example-watcher-ml-alert.json
Created Mar 15, 2019
Full example on a generic elastic Watcher alert
View full-example-watcher-ml-alert.json
{
"trigger": {
"schedule": {
"interval": "5m"
}
},
"input": {
"chain": {
"inputs": [
{
@jorgelbg
jorgelbg / slack-black.js
Created Oct 5, 2018
Slack black theme (inlined) from https://github.com/widget-/slack-black-theme/. Also applied a couple of fixes to work with Slack 3.3.3 (tested)
View slack-black.js
// First make sure the wrapper app is loaded
document.addEventListener("DOMContentLoaded", function() {
// Then get its webviews
let webviews = document.querySelectorAll(".TeamView webview");
// Fetch our CSS in parallel ahead of time
const cssPath = 'https://cdn.rawgit.com/widget-/slack-black-theme/master/custom.css';
let cssPromise = fetch(cssPath).then(response => response.text());
View query.json
{
"version": true,
"size": 500,
"sort": [
{
"@timestamp": {
"order": "desc",
"unmapped_type": "boolean"
}
}
@jorgelbg
jorgelbg / after.json
Created Mar 6, 2018
After network-fix patch
View after.json
"filters": [
{
"id": "30d0e7db5b1bce5f7c9d78ba6b08980b6778fd41e63bc4cb378affccde3670ad",
"events": {
"duration_in_millis": 35,
"in": 24400,
"out": 24400
},
"name": "cidr"
},
@jorgelbg
jorgelbg / before.json
Created Mar 6, 2018
Before network-fix patch
View before.json
"filters": [
{
"id": "30d0e7db5b1bce5f7c9d78ba6b08980b6778fd41e63bc4cb378affccde3670ad",
"events": {
"duration_in_millis": 29,
"in": 24400,
"out": 24400
},
"name": "cidr"
},
View indexchecker
fetching: https://it.wikipedia.org/wiki/Unix
parsing: https://it.wikipedia.org/wiki/Unix
contentType: text/html
tstamp : 2017-11-29T10:45:24.882Z
digest : 1226174fcd8c5676aa3e2396ef7a750d
host : it.wikipedia.org
id : https://it.wikipedia.org/wiki/Unix
title : Unix - Wikipedia
url : https://it.wikipedia.org/wiki/Unix
content : Unix - Wikipedia
View test.conf
Alias /test "/var/www/test"
<Directory "/var/www/test">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
View SmartSquareFilter.php
<?php
class SmartSquareFilter extends AbstractImagickFilter
{
protected function doApply(\Imagick $im)
{
$target = $im->getImageGeometry();
if ($target['width'] === $target['height']) {
// return early if already square