Skip to content

Instantly share code, notes, and snippets.

Cerys Williams c3ry5

  • London, United Kingdom
Block or report user

Report or block c3ry5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@smithclay
smithclay / index.js
Created Jun 16, 2017
"Hello World" AWS Lambda + Terraform Example
View index.js
// 'Hello World' nodejs6.10 runtime AWS Lambda function
exports.handler = (event, context, callback) => {
console.log('Hello, logs!');
callback(null, 'great success');
}
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active May 23, 2019
Note - How completely uninstall PostgreSQL 9.X on Mac OSX
View remove_postgres_on_mac_os.md

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@cpilsworth
cpilsworth / post.POST.html
Last active Apr 21, 2016
Using acs-aem-commons forms functionality with Sightly
View post.POST.html
<sly data-sly-use.form="test.js"></sly>
sly data-sly-test.errors="${form.validate}"></sly>
<sly data-sly-test="${errors}">${form.renderForm}</sly>
<sly data-sly-test="${!errors}">${form.redirectSuccess}</sly>
@gabrielwalt
gabrielwalt / logic.js
Last active Sep 5, 2019
Read AEM runmodes from Sightly
View logic.js
var SlingSettingsService = Packages.org.apache.sling.settings.SlingSettingsService;
use(function () {
// Get runmodes and transform them into an object that is easier to read for Sightly
var runmodesObj = {};
var runmodesSet = sling.getService(SlingSettingsService).getRunModes();
var iterator = runmodesSet.iterator();
while (iterator.hasNext()) {
runmodesObj[iterator.next()] = true;
@toodooleedoo
toodooleedoo / README.md
Last active Jun 23, 2017
#AEM #Sightly #SSJS Server Side JavaScript Use-API Breadcrumbs
View README.md

###Description Retrieve a Page Object from all pages which are in the Site root then build a breadcrumb component and display the current pages title in a submenu.

###Use case Display a bar under eg a menu which displays the current pages title and functional breadcrumb components o the right.

##Requirements

  • Responsive and which works on all mobile devices and desktop.
  • Current pages title on the left
  • Breadcrumbs on the right
@toodooleedoo
toodooleedoo / README.md
Last active Apr 21, 2016
#AEM #SIGHTLY #JAVASCRIPT ACS Commons Generic List get a value
View README.md
@toodooleedoo
toodooleedoo / README.md
Last active May 9, 2017
#AEM #SIGHTLY #SSJS JavaScript Use-API to append parameters and attributes to anchors
View README.md

##Description

  1. Append two custom parameters to specific URL's entered by an Author.
  2. Open all links pointing outside your site inside a new window
  3. Add .html to links entered through the GUI pathfield widget (@adobe why is this not OOTB?)

##Use case When an Author selects a link via pathfield I found AEM is not adding the extension. I was going to add some Client Side JavaScript to my dialog windows to handle this on save however I also had the following business requests so I leveraged Server Side JavaScript to take care of all of this.

##Requirements

  • When a request is to domain1name.com or domain2name.com append 2 author controllable URL parameters used for Tracking which the authors could control Globally per site.
View simple-https-server.py
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@shyiko
shyiko / pom.xml
Created Feb 12, 2012
Sonar & JaCoCo & Maven 3 integration
View pom.xml
<project ...>
...
<properties>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
<sonar.jacoco.reportPath>${user.dir}/target/jacoco.exec</sonar.jacoco.reportPath>
</properties>
...
<build>
<plugins>
View akamai_debug_headers.txt
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no
You can’t perform that action at this time.