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 / 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)
@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 / 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: