Skip to content

Instantly share code, notes, and snippets.

Evgeny Zislis kesor

Block or report user

Report or block kesor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kesor
kesor / xml2json.js
Last active Nov 18, 2019
Slightly cleaned up version of xml2json by Stefan Goessner/2006 http://goessner.net
View xml2json.js
/* This work is licensed under Creative Commons GNU LGPL License.
License: http://creativecommons.org/licenses/LGPL/2.1/
Version: 0.9
Author: Stefan Goessner/2006
Web: http://goessner.net/
Original file: https://goessner.net/download/prj/jsonxml/
*/
function xml2json(xml) {
View keybase.md

Keybase proof

I hereby claim:

  • I am kesor on github.
  • I am kesor (https://keybase.io/kesor) on keybase.
  • I have a public key ASBXaH4PUfL6oeNFmPX5ZOyZ-9aO21ZE9wc-gtK5o4dnZQo

To claim this, I am signing this object:

@kesor
kesor / cloudtrail-template-elasticsearch.json
Last active May 23, 2019
An ElasticSearch Index template for CloudTrail events
View cloudtrail-template-elasticsearch.json
PUT _template/cloudtrail
{
"index_patterns": ["cloudtrail-*"],
"settings": {
"number_of_shards": 1,
"mapping": {
"total_fields": {
"limit": 10000
}
}
@kesor
kesor / setup-helm.sh
Last active Jan 24, 2019
Setup HELM/Tiller with TLS verification and Cluster Admin RBAC role link
View setup-helm.sh
#!/bin/bash
HELM_TILLER_SA=tiller
HELM_TILLER_NS=kube-system
tiller_tls() {
[ ! -f tiller-ca.crt ] && \
openssl req -x509 -new -newkey rsa:2048 -keyout tiller-ca.key -nodes -sha256 -days 3650 -out tiller-ca.crt -subj "/CN=tiller-ca"
[ ! -f tiller.crt ] && {
echo subjectAltName=IP:127.0.0.1 > extfile.cnf
@kesor
kesor / tsm.diff
Last active Dec 9, 2018
TradeSkillMaster Crafting Operation restock quantity from CustomPrice source
View tsm.diff
diff --git a/Core/Service/Crafting/Core.lua b/Core/Service/Crafting/Core.lua
index c2e2bf3..752013f 100644
--- a/Core/Service/Crafting/Core.lua
+++ b/Core/Service/Crafting/Core.lua
@@ -548,7 +548,10 @@ function Crafting.RestockHelp(link)
end
+ local maxRestock = TSMAPI_FOUR.CustomPrice.GetValue(opSettings.maxRestock, itemString)
+ local minRestock = TSMAPI_FOUR.CustomPrice.GetValue(opSettings.minRestock, itemString)
+
View test-peer-discovery.go
package main
import (
"fmt"
"os"
"strings"
"time"
)
func printFatal(e error) {
View service_registry.go
package main
import (
"encoding/json"
"fmt"
)
type ServiceDescriptionPayload struct {
Address string `json:"address"`
}
@kesor
kesor / output of stracestats
Last active Jun 6, 2018
strace output for a very very long logstash startup
View output of stracestats
# 0% of syscalls and syscall time are removed for brevity
...
...
...
fstat
num calls: 1714 1% of syscalls
View javascript-array-assoc.js
Array.prototype.assoc = function(obj) { return ARR.find( function(iArr) { return iArr[0] == obj } ) }
const ARR = [ [ "a", "b", "c" ], [ 1, 2, 3 ], [ "a", 2 ] ]
ARR.assoc("a")
// > [ 'a', 'b', 'c' ]
@kesor
kesor / README.md
Last active Feb 4, 2018
generating a simple api-gateway using swagger-codegen nodejs-server
View README.md

API Gateway w/Swagger Codegen

I need a simple API Gateway that will use Swagger as its input format. A very simple way to achieve this is to use swagger-codegen and create a nodejs-server that will simply proxy (and optionally modify) requests it receives to some other host.

Node.js request proxy

You can’t perform that action at this time.