Skip to content

Instantly share code, notes, and snippets.

View aromatix's full-sized avatar

Rachid BERKANE aromatix

View GitHub Profile

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@aromatix
aromatix / gist:45c20d04aea4037efcb9b8ca1a644e18
Created July 26, 2016 23:23 — forked from mikepfeiffer/gist:3851e3bd95591e0675aa4c76cd57635f
AWS Lambda Function to Start an EC2 Instance
var AWS = require('aws-sdk');
exports.handler = function(event, context) {
var ec2 = new AWS.EC2({region: 'us-east-1'});
ec2.startInstances({InstanceIds : ['i-0114833f8ffc9151c'] },function (err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
context.done(err,data);
});
};
@aromatix
aromatix / gist:db37cc6bff55f7951e0ae5ed0de26678
Created July 26, 2016 23:21 — forked from mikepfeiffer/gist:4d9386afdcceaf29493a
EC2 UserData script to install CodeDeploy agent
#!/bin/bash
yum install -y aws-cli
cd /home/ec2-user/
aws s3 cp 's3://aws-codedeploy-us-east-1/latest/codedeploy-agent.noarch.rpm' . --region us-east-1
yum -y install codedeploy-agent.noarch.rpm
@aromatix
aromatix / mixpanel-cheatsheet.js
Created November 10, 2015 02:05 — forked from LeCoupa/mixpanel-cheatsheet.js
Mixpanel Library CheatSheet
// Mixpanel Cheatsheet
// This requires the mixpanel javascript library to be embedded on your site
// https://mixpanel.com/help/reference/javascript-full-api-reference
// 1. API Methods.
mixpanel.init('new token', { your: 'config' }, 'library_name'); // initialize a new instance of the Mixpanel tracking object
mixpanel.push(['register', { a: 'b' }]); // push() keeps the standard async-array-push behavior around after the lib is loaded. This is only useful for external integrations that do not wish to rely on our convenience methods (created in the snippet).
@aromatix
aromatix / Hudson email-ext configuration example.txt
Last active August 29, 2015 14:28 — forked from textarcana/Hudson email-ext configuration example.txt
Hudson email-ext plugin configuration examples
Project $PROJECT_NAME build #$BUILD_NUMBER status: $BUILD_STATUS, at SVN revision $SVN_REVISION.
Details at $BUILD_URL
$FAILED_TESTS
#!/bin/bash
JQPATH=$(which jq)
if [ "x$JQPATH" == "x" ]; then
echo "Couldn't find jq executable." 1>&2
exit 2
fi
set -eu
shopt -s nullglob
<VirtualHost *:80>
ServerName zf2-tutorial.localhost
DocumentRoot /var/www/public/zf2-tutorial/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/public/zf2-tutorial/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
return array(
'navigation' => array(
'default' => array(
array(
'label' => 'Home',
'route' => 'home', // route name
'icon' => 'glyphicon glyphicon-home',
),
array(
'label' => 'Analytics',