Skip to content

Instantly share code, notes, and snippets.

Avatar

Asa Baylus asabaylus

View GitHub Profile
@asabaylus
asabaylus / gist:b0fea14fbcc3d368b044
Last active Aug 29, 2015
AEM DOM Based Routing
View gist:b0fea14fbcc3d368b044
/*
AEM DOM BASED ROUTING SECTION
The data-controller attribute should point to the module defined JS controller (required)
The data-action attribute should reference a method of that controller, which will be passed an array of dom elements .
(Defaults to init)
The data-config object should contain a JSON object with configuration parameters (optional)
See http://www.paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/ for inspiration
ex: <div id="${divId}"
data-composer='foo'
data-action='doit'
View gist:6e22452b2efa02fcf197
_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
View gist:018ebe9870ec2c600f50
<?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>
View gist:8daeceed6e4d8302b9fe
~/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:
View gist:53378907a336cbbbce8b
'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*' +
@asabaylus
asabaylus / nginx
Created Sep 9, 2011
nginx init.d for v1.0.6
View nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid
@asabaylus
asabaylus / getGuidByName
Created Nov 18, 2011
Get GUID from User Name
View getGuidByName
var users = {
"a54bca8764-13bx5-8nln8s-0ga7d" : {
"name" : "Louise Voress",
"type" : "Committee",
"primarynominator" : "Dorrie Hutchison",
"reviewer1" : {"name" : "Tom Jones", "grade" : "A", "comments" : "", "status" : "Saved"},
"reviewer2" : {"name" : "Lucy Young", "grade" : "A", "comments" : "", "status" : "Saved"},
"adjudicator" : {"name" : "Steven Taylor", "recommendation" : "Yes", "comments" : "", "status" : "Saved"},
"os" : [
{"name" : "Kevin Joseph", "vote" : "Yes", "comments" : "", "status" : "Saved"},
@asabaylus
asabaylus / grunt.js
Created Jul 6, 2012
Jasmine Junit Reporter Scafolding
View grunt.js
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:jquery.sessiontimeout.js.jquery.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
@asabaylus
asabaylus / gist:3310929
Created Aug 10, 2012
Load TypeKit using jQuery
View gist:3310929
(function() {
var config = {
kitId: "XXXXXXX",
scriptTimeout: 3000
}
, l = "wf-loading"
, d = "wf-inactive"
, h = $("html").addClass(l)
, t = setTimeout(function(){
h.removeClass(l).addClass(d);
View email-mamangement.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>
ACS Email Management
</title><meta id="storemsg" name="storemsg" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="application" content="Giving"/>
<!-- Search Engine Verify for Home Page -->
<meta name="msvalidate.01" content="3D92C0EE929BE04567ECFDE4F390DC96" />
<meta name="google-site-verification" content="xL7RtAlI13QtadjUtrjw9-TnDxGRYmO6ysBvEd9_xwQ" />