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 / purgeAkamai.sh
Last active January 20, 2019 20:04 — forked from PatrickRoumanoff/purgeAkamai.sh
A bash script for a ci build that is purging the Akamai cache and wait for the task to complete
#!/bin/bash
#strict mode
set -euo pipefail
IFS=$'\n\t'
URL="https://api.ccu.akamai.com/ccu/v2"
CURL="curl --fail --silent --header \"Content-Type:application/json\" --user username:password"
echo '{"type":"cpcode","objects":["000000","111111"]}' > data.json
@juanxhos
juanxhos / ClonedReindexingInstructions.md
Created February 23, 2018 13:35 — forked from andrewmkhoury/ClonedReindexingInstructions.md
Reindexing Oak Async Indexes on a Clone AEM Instance

How to Reindex AEM on a Clone Instance and Sync over the Changes

  1. Install Oak 1.0.23 hotfix via the AEM package manager (Download from here https://files.acrobat.com/a/preview/40ddf9c0-83de-48b3-837b-602388e68b06)
  2. Validate that the hotfix is installed by going to /system/console/bundles UI and validate that oak-core version is now at 1.0.23. Also go to /crx/de/index.jsp and see the Oak version on the right side.
  3. Clone your AEM instance to another VM for reindexing
  4. Download these oak-run jars:
  1. Upload the oak-run jars to the clone server
  2. Stop AEM (stop all AEM instances if a cluster or cold standby)
@juanxhos
juanxhos / AEM cURL
Created February 22, 2018 22:02 — forked from joemaffia/AEM cURL
AEM cURL commands
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
Build a bundle
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd
@juanxhos
juanxhos / gist:fa913180612302330d443cf4ba12963d
Last active April 8, 2020 15:02 — forked from lxneng/gist:741932
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
@juanxhos
juanxhos / dhcp
Last active May 8, 2017 21:46
chef-provisioning-vspherewait_for_ipv4_enhancement_v2
[2017-05-08T18:04:44-03:00] WARN: No cookbooks directory found at or above current directory. Assuming /Users/jcalonsoh/development/community/chef-provisioning-vsphere.
[2017-05-08T18:04:44-03:00] WARN: Port 8889 not available
creating machine cmvd-test-1584336ce24906f2ee2b1cb0ba17852e on vsphere://nvsplservctvp01.infra.novis.cl/sdk?use_ssl=true&insecure=true
use_linked_clone: false
datacenter: "Cluster_Poc"
template_name: "TPL-WIN2012R2-SYSPREPV2"
template_folder: "VMWARE"
vm_folder: "Servidores Chef"
network_name: ["n1kPoC-Vmware60/poc_productiva2"]
resource_pool: "POC01/PoC-Pool"
@juanxhos
juanxhos / kichen.log
Created April 27, 2017 14:10
more fixes tested
----> Starting Kitchen (v1.16.0)
-----> Creating <static-windows-2012r2>...
[2017-04-27T10:27:18-03:00] WARN: Port 8889 not available
creating machine static-windows-2012r2-20f26c39 on vsphere://nvsplservctvp01.infra.novis.cl/sdk?use_ssl=true&insecure=true
use_linked_clone: false
datacenter: "Cluster_Poc"
resource_pool: "POC01/PoC-Pool"
vm_folder: "Servidores Chef/kitchen/jcah"
num_cpus: 4
network_name: ["n1kPoC-Vmware60/poc_productiva2"]
@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"
@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 / 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 / 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)