Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / istio-minikube-kubectl-k8s-local.md
Last active February 5, 2019 03:06
Istio 1.0.5 Running on Minikube v0.33.1 Kubectl 1.13.0 Kubernetes 1.10.0 Helm 2.12.1

Download Install: Kubectl(1.13.0)

curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl

Install Minikube(0.33.1)

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && chmod +x minikube
@diegopacheco
diegopacheco / git-diff-patch-apply.md
Last active November 5, 2018 18:25
Git: Create and Apply Patches

Create a PATCH from DIFF

git remote add remote_other https://github.com/user/some.git
git remote -v
git fetch remote_other
git diff --no-prefix remote_other/master..master > 01.patch

Apply a PATCH from DIFF

git apply --stat 01.patch
@diegopacheco
diegopacheco / Kernel-driver-not-installed-virtualbox-linux-issue.md
Created April 5, 2017 17:27
VirtualBox Issue on 16.04: Kernel driver not installed (rc=-1908)
@diegopacheco
diegopacheco / kubernetes-local-minikube-linux.md
Last active July 27, 2017 04:43
How to run Kubernetes Localy wirth minikube on Linux?

Every time you update virtualbox

sudo apt-get install virtualbox-dkms
sudo apt-get install linux-headers-generic
sudo /etc/init.d/virtualbox start

Install minikube and Kubectl

sudo rm -rf /usr/local/bin/kubectl
@diegopacheco
diegopacheco / jmx-jvm-linux.md
Last active July 30, 2018 07:55
How to List JMX linux?
wget http://repo.typesafe.com/typesafe/releases/cmdline-jmxclient/cmdline-jmxclient/0.10.3/cmdline-jmxclient-0.10.3.jar
java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199

Sample for CASS

java -jar  cmdline-jmxclient-0.10.3.jar - localhost:7199 java.lang:type=Threading ThreadCount
java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199 java.lang:type=ClassLoading LoadedClassCount
@diegopacheco
diegopacheco / install-dynomite-redis.sh
Last active September 17, 2018 14:15
script to install dynomite and redis on amazon linux
#!/bin/bash
#
# Install java 8
#
cd ~
sudo yum update -y
sudo yum remove java -y
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar -xzvf jdk-8u45-linux-x64.tar.gz
@diegopacheco
diegopacheco / dynomite-manager-changes.md
Last active November 8, 2016 02:52
How to Install, Configure and Run Dynomite Manager on CentOS / Amazon Linux on AWS Cloud

Creating a redis Module in 15 lines of code!

A quick guide to write a very very simple "ECHO" style module to redis and load it. It's not really useful of course, but the idea is to illustrate how little boilerplate it takes.

Step 1: open your favorite editor and write/paste the following code in a file called module.c

#include "redismodule.h"
/* ECHO <string> - Echo back a string sent from the client */
int EchoCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
@diegopacheco
diegopacheco / gradle-eclipse-idea-ide-gen.md
Created March 22, 2016 17:53
Global configu for Gradle(Generate IDE(eclipse/Idea) files without change build.gradle)
# GOTO Your Home directory
cd /home/diego/.gradle 
touch init.gradle
vim init.gradle
allprojects {
  apply plugin: 'eclipse'
 apply plugin: 'idea'