Skip to content

Instantly share code, notes, and snippets.

View cliffano's full-sized avatar
🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'

Cliffano Subagio cliffano

🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'
View GitHub Profile
@cliffano
cliffano / repoman-notes.txt
Last active March 9, 2021 03:53
Utility scripts using repoman
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 June 8, 2018 07:27
Enable CRXDE outputs AEM 6.2, 6.3, 6.4
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 April 29, 2022 09:37
gpg cryptic errors
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:
@cliffano
cliffano / wait-for-fact.sh
Created July 29, 2016 01:20
wait for the existence of a facter fact via shell
#!/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 22:42
Terraform configuration for setting up S3 static site bucket with a Route53 A record.
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 / set_stash_group_permission.sh
Created April 19, 2016 01:27
Add group permission to multiple Stash repositories
#!/bin/bash
user=<user>
pass=<pass>
base_url=<http://stash_host:stash_port>
project=<project>
repos="<repo1> <repo2> ... <repoN>"
permission=<REPO_READ|REPO_WRITE|REPO_ADMIN>
group=<group>
@cliffano
cliffano / couchdb2couchpenter.js
Created September 2, 2015 23:11
Retrieve all database names in a CouchDB database and create a Couchpenter config.
var fs = require('fs');
var http = require('http');
var url = require('url');
if (process.argv.length !== 3) {
console.error('Usage: node couchdb2couchpenter.js https://host:port');
process.exit(1);
}
var _url = url.parse(process.argv[2]);
@cliffano
cliffano / gist:b268c090f905eccf35fe
Last active August 29, 2015 14:17
npmjs registry intermitten failure
> openssl s_client -connect registry.npmjs.org:443 -prexit
CONNECTED(00000003)
write:errno=54
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 130 bytes
@cliffano
cliffano / gist:b47b389721fe5a3403f9
Created November 5, 2014 15:26
pkjutil traverse-dependencies
* [email protected]
- dependencies:
- async: ~0.9.0
- bagofcli: ~0.2.0
- bagofrequest: ~0.1.0
- colors: ~1.0.3
- lodash: ~2.4.1
- prod: ~1.0.0
- semver: ~4.1.0
- devDependencies: