Skip to content

Instantly share code, notes, and snippets.

View asabaylus's full-sized avatar

Asa Baylus asabaylus

View GitHub Profile
@asabaylus
asabaylus / gitcheats.txt
Last active March 31, 2022 17:27 — forked from chrismccoy/gitcheats.txt
git cheats
# From the last release to the HEAD of master
# find all commits with a Jira key
$ git log <branch_A>..<branch_B> 2> /dev/null | grep -Eo "[A-Za-z]+-[0-9]+" | sort | uniq
# checkout the same branch across multiple repos
$ ls | xargs -P10 -I{} git -C {} checkout <branch_name>
# make an alias to run a git command across multiple repo, add to ~/.bashrc or ~/.zshrc
alias agit="ls | xargs -P10 -I{} git -C {}"
@asabaylus
asabaylus / get-keys
Last active May 18, 2017 20:22
Jira Keys from Git Branches
# From the last release to the HEAD of master
# find all commits with a Jira key
$ git log origin/6.6..master | grep -Eo [A-Za-z]+-[0-9]+ | sort | uniq
@asabaylus
asabaylus / foo.html
Created April 28, 2017 12:19
birst
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js" type="text/javascript"></script>
<script src="https://sde.birst.com/js/birst_embed.js" type="text/javascript"></script>
<script type="text/javascript">
var ssoUrl = 'https://sde.birst.com/TokenGenerator.aspx?birst.username=birstforward2016@birst.com&birst.ssopassword=wVn4lZIoEx81nj7BsdC1OJ3TsGdkJF2N&birst.spaceId=6760e6ce-413c-4f41-9b90-6d9906158299';
var params = '&birst.module=newDashboards&birst.embedded=true&birst.dashboard=Sales%20Analysis&birst.page=Summary';
function ssoPost( params ) {
$.post( ssoUrl, {}, function( data ) {
var opts = { width: '100%', height: '800', iframeSrc: 'https://sde.birst.com/SSO.aspx?birst.SSOToken=' + data + params };
@asabaylus
asabaylus / vsync-monitor.sh
Last active October 28, 2016 20:27
vsync-monitor
#!/bin/bash
# print last timestampe from last two log files
# "2016-10-28T14:21:28.022-04:00"
# compare the date to now and return if > 5 min
# convert date to unix epoch
if [ $# = 1 ]; then
now=$(date +"%F %T");
if [[ $(date -d `cat $(ls -1tr /syslog/vsynch/app*.log*) | grep "pushing changes" | cut -c1-19 | tail -1` +%s ) > `date -d "$1 secs ago" +%s` ]];
then echo "$now: VSYNC UP" >> /syslog/vsynch/vsync-monitor.log;
else mail -s "vsync down!" asa@baylus.com,cprocunier@gmail.com,parmstrong@ifthen.com < /dev/null;
@asabaylus
asabaylus / gist:53378907a336cbbbce8b
Created July 2, 2015 14:49
Scrub HTML from input
'use strict';
var tagBody = '(?:[^"\'>]|"[^"]*"|\'[^\']*\')*',
tagOrComment = new RegExp(
'<(?:' +
// Comment body.
'!--(?:(?:-*[^->])*--+|-?)' +
// Special "raw text" elements whose content should be elided.
'|script\\b' + tagBody + '>[\\s\\S]*?</script\\s*' +
~/Dropbox (National Geographic)/Projects/cq-reference/platform feature/AEM-2478* 13s
(vagrant)❯ fab deploy
1.7.0
bpdtool.tasks.aem.deploy WARNING No username argument received, using default: admin
bpdtool.tasks.aem.deploy WARNING No password argument received, using default: admin
[aem.localhost.nationalgeographic.com] Executing task 'check_webapp_access_over_ssh'
[aem.localhost.nationalgeographic.com] run: sudo puppet --version
[aem.localhost.nationalgeographic.com] out: 3.7.3 (Puppet Enterprise 3.7.1)
[aem.localhost.nationalgeographic.com] out:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.foo.www</groupId>
<artifactId>fe-package</artifactId>
<version>0.1.0</version>
@asabaylus
asabaylus / aem_deploy.sh
Last active September 1, 2020 07:41
AEM Deploy Script
#!/bin/bash
#GLOBAL
HTTPRESPONSE="json"
SUCCESS="success"
#TEST
#UIARTFCT="target/package.zip"
#UILOC="./target/"
#AUTHORHOST="localhost"
_isUrl = function (str) {
// pass --> http://google.com
// pass --> ftp://google.com
// pass --> google.com
// pass --> localhost
// pass --> 127.0.0.1
// pass --> 1.1.1.1
// pass --> http://127.0.0.1
// pass --> http://localhost