Skip to content

Instantly share code, notes, and snippets.

View Hexer338's full-sized avatar

Ravi teja Meka Hexer338

View GitHub Profile
@Hexer338
Hexer338 / Trivy Scan Elasticsearch v7.17.9
Created February 20, 2023 12:49
Vulnerability scan of Elasticsearch v7.17.9 docker image using Trivy
{
"SchemaVersion": 2,
"ArtifactName": "e4b82614cac8",
"ArtifactType": "container_image",
"Metadata": {
"OS": {
"Family": "ubuntu",
"Name": "20.04"
},
"ImageID": "sha256:e4b82614cac80061c8ad1bfc5e693d999ee0f9cb59b02e29c535d6eba3a91ec6",
@Hexer338
Hexer338 / script.coffee
Created September 13, 2017 09:13
script to delete test suite data
###
* Info needed: (a) Prefix for team name; (b) Domain
###
request = require "request"
whenjs = require "when"
{promise} = whenjs
teamName = "new team"
domain = "team-ba38ee"
basePath = "http://localhost:9203/"
@Hexer338
Hexer338 / algo.coffee
Last active December 15, 2016 14:08
Algo to hash string to number alphabetically
charsForSort = " _abcdefghijklmnopqrstuvwxyz0123456789"
maxLengthToSort = 10 #We cannot sort for more than 10 characters
charObj = {}
for char,i in charsForSort
charObj[char.toString()] = i+1
getNumberHashForString = (string) ->
hash = 0
charsSorted = 0
@Hexer338
Hexer338 / Elasticsearch Query Performance1.md
Last active August 22, 2016 15:35
Investigation of elasticsearch issue #20097

Elasticsearch version: v2.3.3

Plugins installed: [murmur3]

JVM version:

  • "version" : "1.8.0_91",
  • "vm_name" : "OpenJDK 64-Bit Server VM",
  • "vm_version" : "25.91-b14",
  • "vm_vendor" : "Oracle Corporation",
@Hexer338
Hexer338 / bug investigation.coffee
Created August 19, 2016 13:22
Es query profiling
Query: `SHOW ME AVG(UNITS * UNIT PRICE / SUM(UNITS))`
EsResponse when no calcs inside map_script:
{
"took": 878,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
@Hexer338
Hexer338 / 0_reuse_code.js
Created May 24, 2016 09:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console