This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOMAIN ?= localhost | |
DAYS ?= 500 | |
SAN_DOMAINS ?= | |
COUNTRY := IT | |
STATE := IT | |
COMPANY := Evil Corp. | |
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function jc_remote { | |
jmx_host=$1 | |
jmx_port=${2:-5000} | |
proxy_port=${3:-8123} | |
echo "Connecting jconsole to $jmx_host:$jmx_port via SOCKS proxy using local port $proxy_port" | |
ssh -ND $proxy_port $jmx_host & | |
jconsole -J-DsocksProxyHost=localhost -J-DsocksProxyPort=${proxy_port} \ | |
service:jmx:rmi:///jndi/rmi://localhost:${jmx_port}/jmxrmi | |
kill %1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat <<EOF > /etc/cni/net.d/100-crio-flannel.conf | |
{ | |
"cniVersion": "0.3.0", | |
"name": "mynet", | |
"type": "flannel" | |
} | |
EOF | |
cat <<EOF > /etc/cni/net.d/200-loopback.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Definition for singly-linked list. | |
* public class ListNode { | |
* int val; | |
* ListNode next; | |
* ListNode(int x) { val = x; } | |
* } | |
*/ | |
class Solution { | |
public ListNode addTwoNumbers(ListNode l1, ListNode l2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LongestPalindrome { | |
public String longestPalindrome(String s) { | |
if(s.length() <= 1) return s; | |
int top = s.length() - 1; | |
char[] input = s.toCharArray(); | |
String palindrome = String.valueOf(s.charAt(0)); | |