Skip to content

Instantly share code, notes, and snippets.

POST /_security/role_mapping/kibana_sso
{
"roles": [ "superuser" ],
"enabled": true,
"rules": { "all": [{"field" : { "realm.name" : "*" }}] }
}
This file has been truncated, but you can view the full file.
{
"formats": {
"number": {
"currency": {
"style": "currency"
},
"percent": {
"style": "percent"
}
},
@azasypkin
azasypkin / en.json
Created April 16, 2020 12:26
en.json
This file has been truncated, but you can view the full file.
{
"formats": {
"number": {
"currency": {
"style": "currency"
},
"percent": {
"style": "percent"
}
},

Keybase proof

I hereby claim:

  • I am azasypkin on github.
  • I am oxycom (https://keybase.io/oxycom) on keybase.
  • I have a public key ASD31oUqT7Onld3C0viInsajU1Gbo2HTMqM8-3BjZy_0ygo

To claim this, I am signing this object:

@azasypkin
azasypkin / linux_fusion360.md
Created January 16, 2019 22:56 — forked from probonopd/linux_fusion360.md
Autodesk Fusion 360 in the Linux Browser
@azasypkin
azasypkin / make-phantom-report.js
Created November 8, 2018 18:16
make-phantom-report.js
var url = "http://elastic:changeme@127.0.0.1:5601/app/kibana#/visualize/edit/1a36d1d0-e371-11e8-8a31-0d7a694da690?_g=()&_a=(filters:!(),linked:!f,query:(language:lucene,query:''),uiState:(),vis:(aggs:!((enabled:!t,id:'1',params:(),schema:metric,type:count),(enabled:!t,id:'2',params:(field:_type,missingBucket:!f,missingBucketLabel:Missing,order:desc,orderBy:'1',otherBucket:!f,otherBucketLabel:Other,size:5),schema:segment,type:terms)),params:(addLegend:!t,addTimeMarker:!f,addTooltip:!t,categoryAxes:!((id:CategoryAxis-1,labels:(show:!t,truncate:100),position:bottom,scale:(type:linear),show:!t,style:(),title:(),type:category)),grid:(categoryLines:!f,style:(color:%23eee)),legendPosition:right,seriesParams:!((data:(id:'1',label:Count),drawLinesBetweenPoints:!t,interpolate:linear,mode:stacked,show:true,showCircles:!t,type:area,valueAxis:ValueAxis-1)),times:!(),type:area,valueAxes:!((id:ValueAxis-1,labels:(filter:!f,rotate:0,show:!t,truncate:100),name:LeftAxis-1,position:left,scale:(mode:normal,type:linear),show:!t,s
@azasypkin
azasypkin / index.js
Last active August 30, 2018 08:54 — forked from yankouskia/en.json
translate (npx https://gist.github.com/azasypkin/e3e3526c7bb73223ac53b5cb126ecfae /absolute-path/en.json zh-cn)
#!/usr/bin/env node
const fs = require('fs');
const translate = require('google-translate-api');
const [,, enFile, targetLocale] = process.argv;
console.log(`File ${enFile}, translate to locale ${targetLocale}`);
const en = require(enFile);
#!/usr/bin/env node
console.log('yay gist');
var IntlMessageFormat = require('intl-messageformat');
var memoizeFormatConstructor = require('intl-format-cache');
IntlMessageFormat.defaultLocale = 'ru';
console.log(`Default locale BEFORE memoize: ${IntlMessageFormat.defaultLocale}`);
@azasypkin
azasypkin / map-reduce.js
Last active March 17, 2017 14:08
Javascript MapReduce example
const map = new Map([[1, true], [2, true], [3, false], [4, false], [5, true]]);
const processedMap = Array.from(map.entries())
.map(([key, value]) => [value, key])
.reduce((acc, [key, value]) => acc.set(key, value + (acc.get(key) || 0)), new Map());
console.log('---------- Original Map ----------');
for (const [key, value] of map.entries()) {
console.log(`key: ${key}, value: ${value}`);
}
Setup RaspberryPi:
mkdir -p /etc/ppp/scripts
cat > /etc/ppp/scripts/ppplogin <<EOF
#!/bin/sh
# ppplogin - script to fire up pppd on login
# Disable other users to write to the tty.
mesg n