Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
https://www.reddit.com/r/kubernetes/comments/b2v74a/traefik_as_ingress_controller_strip_path_prefix/
--eviction-hard=memory.available<100Mi,nodefs.available<10%,nodefs.inodesFree<5%
@richardsonlima
richardsonlima / virtualbox-6-installing-guest-additions.txt
Created March 22, 2019 17:52
virtualbox 6 installing guest additions
https://forum.manjaro.org/t/help-with-virtualbox-6-installing-guest-additions/72996/7
HOW TO CONVERT A VIRTULBOX VM TO A BOOTABLE DRIVE
JUL 5, 2017
This is quite easy so I was surprised that I couldn’t find a walk-through anywhere…so here’s one :) This is specifically for a VM of Ubuntu, so it’s possible there may be other hurdles in place for different operating systems.
STEP 1
Create a VM normally in VirtualBox (or use an existing one), install the operating system, and add any programs or files you want to have readily available on the bootable disk.
STEP 2
This is the tricky part, you can use Virtual Box to convert a vdi to an iso, but you have to do it from the terminal. On my machine it wouldn’t work at all in windows default terminal, but I have Cygwin installed, and was able to use that. You first need to cd into the directory where Virtual Box is installed, and run the following command. The folder structure is specific to my machine and will most likely need to be changed on yours.
1
@richardsonlima
richardsonlima / K8S-RBAC-RESTRICT-USER-ACCESS-TO-ONE-NAMESPACE.txt
Created March 20, 2019 17:50
KUBERNETES RBAC: RESTRICT USER ACCESS TO ONE NAMESPACE
KUBERNETES RBAC: RESTRICT USER ACCESS TO ONE NAMESPACE
1. Create Namespace
kubectl create namespace mynamespace
2. Create Service Account with permissions
Open a new file. Let’s call it access.yaml. We’re going to create the user (service account), a role, and attach that role to that user.
---
apiVersion: v1
FROM gliderlabs/alpine:latest
MAINTAINER [email protected]
RUN apk update && apk --update add ruby \
ruby-io-console ca-certificates libssl1.0 openssl libstdc++ \
libxml2-dev libffi-dev
ADD Gemfile /app/
ADD Gemfile.lock /app/
https://github.com/dempfi/ayu
https://medium.com/the-code-review/make-your-terminal-more-colourful-and-productive-with-iterm2-and-zsh-11b91607b98c
version: "2"
networks:
devnet:
driver: bridge
services:
master:
image: richardsonlima/jenkins-cluster-master-2.150.3:v1
ports:
version: "2"
services:
master:
image: richardsonlima/jenkins-cluster-master-2.150.3:v1
ports:
- "8080:8080"
environment:
- JAVA_OPTS=-Xmx2048m
volumes:
- jenkins-master:/var/jenkins_home
Two commands that will solve this :
sudo pmset -b tcpkeepalive 0
sudo pmset hibernatemode 25
To disable this just use (this will revert everything back to normal.
sudo pmset -b tcpkeepalive 1
sudo pmset hibernatemode 3
==> note this will disable also "find my mac"