Skip to content

Instantly share code, notes, and snippets.

View jeremy-page's full-sized avatar

Jeremy Page jeremy-page

  • ICF
  • Greensboro, NC
View GitHub Profile
# Alfresco users
curl -s -u user:pass http://localhost:8080/alfresco/service/api/people | jq '.people[] .userName'
curl -s -u user:pass http://localhost:8080/alfresco/service/api/people | jq '.people[] | "\(.userName),\(.firstName),\(.lastName),\(.email)"'
# Alfresco groups
curl -s -u user:pass http://localhost:8080/alfresco/service/api/groups | jq '.data[] .shortName'
curl -s -u user:pass http://localhost:8080/alfresco/service/api/groups | jq '.data[] | "\(.shortName),\(.fullName),\(.displayName)"'
### Keybase proof
I hereby claim:
* I am jeremy-page on github.
* I am jeremypage (https://keybase.io/jeremypage) on keybase.
* I have a public key ASCcgQleXSLAHh6saunh5uveK92rRj1cqx8GWMXUWTLsHgo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am jeremy-page on github.
* I am jeremypage (https://keybase.io/jeremypage) on keybase.
* I have a public key ASCcgQleXSLAHh6saunh5uveK92rRj1cqx8GWMXUWTLsHgo
To claim this, I am signing this object:
@jeremy-page
jeremy-page / printjenkins.groovy
Created January 13, 2020 16:54 — forked from lyuboraykov/printjenkins.groovy
Print to console in Jenkins Groovy system script
def out
def config = new HashMap()
def bindings = getBinding()
config.putAll(bindings.getVariables())
out = config['out']
out.println "Printed do Jenkins console."
@jeremy-page
jeremy-page / command.sh
Created January 16, 2020 18:33
Get autoscaling policy from a cluster's cluster-id
aws emr describe-cluster --cluster-id <cluster-id> |jq '.Cluster.InstanceGroups[1].AutoScalingPolicy'
@jeremy-page
jeremy-page / cooldown.groovy
Created May 23, 2020 16:25
Make Jenkins wait for a period after boot before scheduling jobs
// Creating a file in $JENKINS_HOME/init.groovy.d/<file>.groovy
// will make give you a few minutes after Jenkins boots before it trys
// to do work
import jenkins.model.Jenkins
import hudson.security.ACL
// Go into quiet mode
Jenkins.instance.doQuietDown()
@jeremy-page
jeremy-page / just-a-snippet.txt
Created June 5, 2020 14:57
EMR ganglia -> grafana
Edit the gmetad.conf file of Ganglia to include the following values:
carbon_server: "localhost"
carbon_port: 3000
carbon_protocol udp
carbon_timeout 500
Edit the influxdb.conf file of InfuxDB to include the following values:
@jeremy-page
jeremy-page / just-a-snippet.txt
Created June 5, 2020 14:57
EMR ganglia -> grafana
Edit the gmetad.conf file of Ganglia to include the following values:
carbon_server: "localhost"
carbon_port: 3000
carbon_protocol udp
carbon_timeout 500
Edit the influxdb.conf file of InfuxDB to include the following values:
@jeremy-page
jeremy-page / add_cname_route53.py
Created September 11, 2020 20:09 — forked from rotemtam/add_cname_route53.py
Add a CNAME record in Route53 using python boto3
import boto3
client = boto3.client('route53')
def add_cname_record(source, target):
try:
response = client.change_resource_record_sets(
HostedZoneId='<hosted zone id>',
ChangeBatch= {
'Comment': 'add %s -> %s' % (source, target),
### Keybase proof
I hereby claim:
* I am jeremy-page on github.
* I am jeremyinnc (https://keybase.io/jeremyinnc) on keybase.
* I have a public key ASAtYlhP6oP3hzKSeiTIDjaj8pxyDEhDlxvzpAOANWQ_Owo
To claim this, I am signing this object: