Skip to content

Instantly share code, notes, and snippets.

View mkurian's full-sized avatar

Merrin Kurian mkurian

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<title>dc.js - Bar Chart Example</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="../css/dc.css"/>
</head>
<body>
<div id="test"></div>
@mkurian
mkurian / ElasticSearch
Last active August 29, 2015 14:08
Tips and Tricks
- Avoid split brain problem by setting minimum master nodes:
http://blog.trifork.com/2013/10/24/how-to-avoid-the-split-brain-problem-in-elasticsearch/
discovery.zen.minimum_master_nodes: set it to N/2 +1
discovery.zen.ping.timeout: change default if required to handle slow nodes
- Use boolean filters instead of and, or not, since they use bitsets
- Use filter over query for repeat searches, since filters are cached
@mkurian
mkurian / MLLearningMaterials.txt
Last active January 24, 2022 10:51
ML learning materials
https://github.com/lazyprogrammer/data-science-blogs
https://github.com/lazyprogrammer/machine_learning_examples : for book Markov Models
https://github.com/lazyprogrammer/DeepLearningTutorials
https://github.com/lazyprogrammer/image-classification-dbn
https://github.com/lazyprogrammer/facial-expression-recognition
@mkurian
mkurian / StuckThreadDetectionCustomValve.java
Created April 30, 2017 17:31
Based on org.apache.catalina.valves.StuckThreadDetectionValve. Changes: splunk friendly logging, configurable threshold value per jvm
package org.apache.catalina.valves;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@mkurian
mkurian / 1_kubernetes_on_macOS.md
Created December 22, 2017 19:44 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
SELECT s.inst_id,
s.sid,
s.serial#,
--s.sql_id,
p.spid,
@mkurian
mkurian / docker-cmds.md
Created May 8, 2019 23:20
Docker commands

Logs for container startup

docker logs CONTAINER

List all containers even dead ones

docker ps -a

Remove all images with a pattern to clean up disk space

docker images -a | grep "pattern" | awk '{print $3}' | xargs docker rmi -f

{
"TableName": "Invoice",
"AttributeDefinitions": [
{
"AttributeName": "business_id",
"AttributeType": "N"
},
{
"AttributeName": "customer_id",
"AttributeType": "S"
{
"AttributeDefinitions": [
{
"AttributeName": "business_id",
"AttributeType": "N"
},
{
"AttributeName": "invoice_id",
"AttributeType": "S"
}