Skip to content

Instantly share code, notes, and snippets.

@marpada
marpada / AEM cURL
Created February 24, 2017 02:28 — forked from joemaffia/AEM cURL
AEM cURL commands
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console)
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle"
Install a bundle
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles
Build a bundle
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd
@marpada
marpada / example.html
Created February 8, 2017 08:33 — forked from doobeh/example.html
Simple example of using a RadioField in Flask-WTForms to generate a form.
<form method="post">
{{ form.hidden_tag() }}
{{ form.example }}
<input type="submit">
</form>
@marpada
marpada / nodesource_012.repo
Created November 17, 2015 19:51
Add nodesource yum repo for nodesource_012 (workaround https://github.com/nodesource/distributions/issues/124)
#!/bin/bash
# Import GPG key of Nodesource RPM Repo
wget -O /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL https://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL
rpm --import /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
node[:deploy].each do |application, deploy|
if deploy[:application_type] != 'php'
Chef::Log.debug("Skipping deploy::php-rollback application #{application} as it is not a PHP app")
next
@marpada
marpada / faststart_dir.rb
Last active August 29, 2015 14:01
Use qt-faststart to move the moov atom on all mp4 files in a given folder
#!/usr/bin/env ruby
require 'fileutils'
QT_FASTSTART='/usr/local/bin/qt-faststart'
if ARGV.count != 1
puts "Usage: #{__FILE__} folder"
exit 1
end