Skip to content

Instantly share code, notes, and snippets.

View nhernandezga-old's full-sized avatar

Noe Hernández García nhernandezga-old

View GitHub Profile
<?xml version="1.0" encoding="Windows-1252" ?>
<!--
Notepad++ Custom Style
Style name: Sublime Monokai
Author: Andrew Nguyen, Joni Eskelinen
Date: 2009-04-06 (last changed 2013-08-29)
Languages: php, html, css, xml, javascript, python, sql, c, c++,
assembly, bash, batch, lua at least for detail. Everything else more or less...
Info: Using Joni Eskelinin's Obsidian theme as a base, this theme
Test
@nhernandezga-old
nhernandezga-old / font-el7.sh
Created August 31, 2018 20:29 — forked from masamitsunamioka/font-el7.sh
installs better than cleartype font rendering on rhel/centos 7
#!/usr/bin/bash
set -e
# set up nux-dextop repo to install font packages. skip if this repo had already set up.
# can be done by either rpm or yum app.
# /usr/bin/sudo /usr/bin/rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
/usr/bin/sudo /usr/bin/yum localinstall http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# disable nux-dextop by default and only enable it as needed as part of running yum.
@nhernandezga-old
nhernandezga-old / java-update-alternatives.md
Created September 14, 2018 03:26 — forked from bench/java-update-alternatives.md
java and javac update-alternatives

update-alternatives maintains symbolic links determining default commands This is a reminder to install java and javac alternatives.

Install alternatives

Install java compiler alternatives

$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.5.0_22/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.6.0_45/bin/javac 2

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
#!groovy
def slackChannel = "#team-slackchannel"
properties([
parameters([
string(name: 'releaseType', description: "major, minor, or patch", defaultValue: 'minor')
])
])
@nhernandezga-old
nhernandezga-old / nginx.conf
Created June 11, 2019 23:14 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@nhernandezga-old
nhernandezga-old / README.md
Created June 15, 2019 08:12 — forked from Informatic/README.md
cloud-init "nocloud" networking setup

cloud-init is absolute cancer. Its code is horrible. It has no documentation at all.

It took me 5 fucking hours to figure out how to properly configure networking on recent cloud-init (Ubuntu 16.04 cloud image) with local datasource.

It's not mentioned anywhere you need to provide dsmode: local. (but only if you need network-config, besides that everything is fine; someone below noted that -m flag does the same thing, good to know) Of course nobody needs documentation for network-config format either. (cloudinit/net/__init__.py is a protip, enjoy the feces dive)

Oh, and by the way - no, it's not possible to provide network-config to uvt-kvm without patching shit.

@nhernandezga-old
nhernandezga-old / tutorial.md
Created June 22, 2019 19:41 — forked from Hengjie/tutorial.md
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha