Skip to content

Instantly share code, notes, and snippets.

View juanxhos's full-sized avatar
:octocat:
Waiting for Actions be faster than Travis =)

Juan Carlos Alonso Holmstron juanxhos

:octocat:
Waiting for Actions be faster than Travis =)
View GitHub Profile
@juanxhos
juanxhos / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@juanxhos
juanxhos / ldaptree-sshd.ldif
Created January 6, 2015 20:52
LDIF - ldaptree-sshd
version: 1
dn: dc=chile,dc=cl
objectClass: top
objectClass: dcObject
objectClass: organization
dc: chile
o: Servidor chile
dn: ou=persons,dc=chile,dc=cl
# Problem Statement
# Create a class Calculator, which performs addition and subtraction of two numbers at a time.
class Calculator
def add(a, b)
a+b
end
def subtract(a, b)
a-b
end
@juanxhos
juanxhos / Ultimate OpenStack IceHouse Guide - ML2 Flat Network - IPv6-Friendly.md
Last active September 6, 2015 17:48
Ultimate OpenStack IceHouse Guide - ML2 Flat Network - IPv6-Friendly

Ultimate OpenStack IceHouse Guide

NOTE: This Guide was merged into: https://github.com/tmartinx/openstack-guides/blob/master/IceHouse/

This is a Quick Guide to deploy OpenStack IceHouse on top of Ubuntu 14.04, it is IPv6-Ready!

It is compliant with OpenStack's official documentation (docs.openstack.org).

The tenant's subnets are based on Neutron, with ML2 plugin and Single Flat Network topology, dual-stacked.

@juanxhos
juanxhos / gitlab2elk.yml
Created October 11, 2015 18:14 — forked from jerrac/gitlab2elk.yml
Logstash and Logstash-Forwarder config for GitLab logs
# YAML config for these Ansible roles:
# https://github.com/LaneCommunityCollege/aspects_logstash
# https://github.com/LaneCommunityCollege/aspects_logstash_forwarder
#
# Since it's just straight config blocks, you should be able to just copy and paste what you need if you don't use
# those Ansible roles.
#
# End result is multiline logs combined into one, and dates are parsed correctly.
aspects_logstash_rules:
@juanxhos
juanxhos / ec2-user-data.ps1
Last active April 8, 2020 15:02 — forked from mefellows/ec2-user-data.ps1
Packer Community Plugins - Example Windows 2012 Setup
<powershell>
write-output "Running User Data Script"
write-host "(host) Running User Data Script"
cmd.exe /c net user /add vagrant FooBar@123
cmd.exe /c net localgroup administrators vagrant /add
Set-ExecutionPolicy -ExecutionPolicy bypass -Force
# RDP
@juanxhos
juanxhos / 00-set-authorization.groovy
Created May 6, 2016 16:39 — forked from xbeta/00-set-authorization.groovy
put them in $JENKINS_HOME/init.groovy.d/
import jenkins.model.*;
import hudson.security.*;
// JVM did not like 'hypen' in the class name, it will crap out saying it is
// illegal class name.
class BuildPermission {
static buildNewAccessList(userOrGroup, permissions) {
def newPermissionsMap = [:]
permissions.each {
newPermissionsMap.put(Permission.fromId(it), userOrGroup)
@juanxhos
juanxhos / add_disk.rb
Created January 26, 2017 17:19 — forked from big-samantha/add_disk.rb
Code to add a disk to a vSphere VM
def add_disk(vmname, size, datastore)
begin
@connection.serviceInstance.CurrentTime
rescue
initialize
end
vm = find_vm(vmname) || find_vm_heavy(vmname)[vmname]
vmdk_datastore = find_datastore(datastore)
@juanxhos
juanxhos / suse_chef_bootstrap.sh
Last active February 20, 2017 15:20 — forked from fnichol/README.md
Chef Bootstrapper For SuSE/SLES
#!/usr/bin/env bash
# __pkgs=( gcc-c++ zlib zlib-devel libffi-devel sqlite3-devel libxml2-devel libxslt-devel libreadline5 readline-devel libopenssl-devel )
__pkgs=( gcc automake gdbm-devel libffi-devel libyaml-devel openssl-devel ncurses-devel readline-devel zlib-devel make )
log() { printf "===> $*\n" ; return $? ; }
fail() { log "\nERROR: $*\n" ; exit 1 ; }
@juanxhos
juanxhos / reposync.sh
Last active February 6, 2017 20:47 — forked from piotr1212/gist:9135754
reposync script
#!/bin/bash
# based on: http://blog.kagesenshi.org/2007/06/fedora-repository-mirroring-script.html
# mirror root - the place you want the rpms to be downloaded
MROOT="/opt/delivery/files/centos"
# processor architectures (space separated)
ARCHS="x86_64"