Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'

Cliffano Subagio cliffano

🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'
View GitHub Profile
View gist:811993ffbe52890c272fa8279b6fd0d8
var fs = require('fs');
var parser = require('fast-xml-parser');
const file1 = process.argv[2]
const file2 = process.argv[3]
console.log("Comparing " + file1 + " to " + file2)
const xmlData1 = fs.readFileSync(file1, { encoding: 'utf-8' })
const xmlData2 = fs.readFileSync(file2, { encoding: 'utf-8' })
View bookmarks of things easily forgotten
AWS
===
https://theburningmonk.com/cloudformation-ref-and-getatt-cheatsheet/
https://docs.aws.amazon.com/vpc/latest/userguide/integrated-services-vpce-list.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonquicksight.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncomprehend.html
https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazons3.html
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client
https://currentlyunnamed-theclassic.blogspot.com/2018/12/mastering-cloudformation-for-api.html
@cliffano
cliffano / repoman-notes.txt
Last active Mar 9, 2021
Utility scripts using repoman
View repoman-notes.txt
Poor man's quick stats of git logs analysis
===========================================
Retrieve git logs across multiple repositories, then count the number of commits made by any author:
repoman exec 'git log' >> /tmp/gitlog.txt
grep "Author: " /tmp/gitlog.txt | wc -l
Count the commits by author:
@cliffano
cliffano / enable-crxde-64-inconsistency
Last active Jun 8, 2018
Enable CRXDE outputs AEM 6.2, 6.3, 6.4
View enable-crxde-64-inconsistency
Based on https://helpx.adobe.com/experience-manager/6-4/sites/administering/using/enabling-crxde-lite.html
================================================================================================
AEM 6.3 and AEM 6.2
================================================================================================
[aem-6.3] curl -u admin:admin -F "jcr:primaryType=sling:OsgiConfig" -F "alias=/crx/server" -F "dav.create-absolute-uri=true" -F "dav.create-absolute-uri@TypeHint=Boolean" http://localhost:4502/apps/system/config/org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet
<html>
<head>
<title>Content created /apps/system/config/org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet</title>
@cliffano
cliffano / gpgcryptic.txt
Last active Jan 21, 2018
gpg cryptic errors
View gpgcryptic.txt
I started getting the error below after upgrading to gpg (GnuPG) 2.1.21 .
gpg: signing failed: Timeout
gpg: signing failed: Timeout
This was confusing at first, but the timeout was caused by gpg showing a password prompt that takes the full screen of the terminal, and after a period of time, it returned to the command line showing the timeout error.
I didn't notice the password prompt at first because I was working on multiple terminals and only saw the timeout error at the end.
Another error that I encountered earlier was:
View command-ps-gnuplot.script
set term png small size 800,600
set output "command-ps-graph.png"
set ylabel "%CPU"
set y2label "MEM"
set ytics nomirror
set y2tics nomirror in
set yrange [0:*]
@cliffano
cliffano / gource-multi-repos.sh
Created Mar 11, 2017
Gource shell script for visualizing multiple GitHub repositories
View gource-multi-repos.sh
#!/bin/bash
set -e
set -u
# brew install gource ffmpeg
user=<github_user/org>
repos="<repo1> <repo2> ... <repoN>"
rm -rf repos logs out
@cliffano
cliffano / wait-for-fact.sh
Created Jul 29, 2016
wait for the existence of a facter fact via shell
View wait-for-fact.sh
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: check-fact <fact_name>" >&2
exit 1
fi
name=${1}
max_retries=60
@cliffano
cliffano / s3staticsite_route53a.tf
Created May 26, 2016
Terraform configuration for setting up S3 static site bucket with a Route53 A record.
View s3staticsite_route53a.tf
variable "bucket_site" {}
variable "region" {}
variable "route53_domain_name" {}
variable "route53_domain_zoneid" {}
variable "route53_domain_alias_name" {}
variable "route53_domain_alias_zoneid" {}
provider "aws" {
region = "${var.region}"
}
@cliffano
cliffano / clean_puppetdb.sh
Created Apr 27, 2016
Deactivate and clean nodes in PuppetDB
View clean_puppetdb.sh
#!/bin/bash
domains="domain1.xyz domain2.xyz"
for DOMAIN in ${domains}; do
puppet node deactivate ${DOMAIN}
puppet node clean ${DOMAIN}
done