Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jreypo's full-sized avatar
🇪🇸
Living life my way

Juanma jreypo

🇪🇸
Living life my way
View GitHub Profile
@jreypo
jreypo / nsx_ctrl_syslog.xml
Created September 30, 2015 00:13
REST API call to configure remote syslog serve in NSX for vSphere Controllers
<controllerSyslogServer>
<syslogServer>192.168.1.30</syslogServer>
<port>514</port>
<protocol>UDP</protocol>
<level>INFO</level>
</controllerSyslogServer>
@jreypo
jreypo / cbm_db_create.sql
Last active January 2, 2016 03:29
SQL script to create the vCenter Chargeback database in Microsoft SQL Server
use [master]
GO
CREATE DATABASE [CBDB] ON PRIMARY
(NAME = N'CBDB', FILENAME = N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\CBDB.mdf' , SIZE = 200000KB , FILEGROWTH = 10% )
LOG ON
(NAME = N'CBDB_log', FILENAME = N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\CBDB.ldf' , SIZE = 20000KB , FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
GO
use [CBDB]
for node in $(ironic node-list | egrep "power on" | awk '{print $2}'); do
echo "Powering off $node"
ironic node-set-power-state $node off
done
{
"type": "ExistingCloud",
"auth_url": "http://172.16.98.7:5000/v2.0",
"region_name": "RegionOne",
"admin": {
"username": "admin",
"password": "redhat",
"tenant_name": "admin"
}
}
@jreypo
jreypo / devstack_local.conf
Last active January 16, 2017 07:11
My DevStack local.conf file
[[local|localrc]]
ADMIN_PASSWORD=vmware
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
HOST_IP=192.168.82.20
# VMware Nova Info
VIRT_DRIVER=vsphere

CMD useful comands

  • tasklist - To list the tasks running
  • taskkill - To kill a task

Examples

Search for a task

#!/bin/bash
#
# Script to install Docker and Kubeadm in Ubuntu 18.04
#
# Written by Juan Manuel Rey <juanmanuel.reyportal@gmail.com>
# Based on Kubernetes official doc
#
echo "Installing Docker..."
@jreypo
jreypo / boxstarter.ps1
Last active May 19, 2020 09:39
Boxstarter script for quick Windows 10 setup
# Description: Boxstarter Script
# Author: Juan Manuel Rey <juanmanuel.reyportal@gmail.com>
#
# Heavily based on Jess Frazz Boxstarter gist https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#

Keybase proof

I hereby claim:

  • I am jreypo on github.
  • I am jreypo (https://keybase.io/jreypo) on keybase.
  • I have a public key ASD3xugQdQNn1V_bE7Ra38ASzJarqSm7v6Y9Da58ZWUVIwo

To claim this, I am signing this object:

@jreypo
jreypo / bastion-tunnel.sh
Created April 12, 2023 14:00
Script to open an tunnel to Azure Bastion and use Remote Desktop to acess a VM in Azure
#!/bin/bash
#
# Azure Bastion tunnel script by @jreypo
#
echo -n "Enter resource group name: "
read rg
echo -n "Enter Bastion name: "
read bastion
echo -n "Enter virtual machine name: "