Skip to content

Instantly share code, notes, and snippets.

View abdennour's full-sized avatar
On vacation

abdennour abdennour

On vacation
View GitHub Profile
PurpleBooth /
Last active June 20, 2024 01:55
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


soarez /
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
bradrydzewski /
Last active May 27, 2024 15:59
Generate trusted CA certificates for running Docker with HTTPS
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
# See
# To start the Docker Daemon:
# sudo docker -d \
bitmvr /
Last active May 24, 2024 08:29
A POSIX Compliant SemVer Parser in Pure Bash
#!/usr/bin/env bash
chusiang / cloudfront_create_invalidation_policy.json
Last active January 30, 2024 13:15
AWS IAM policy of CloudFront Create Invalidation
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "arn:aws:s3:::MyBucketName"
"Action": [
curl | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial main
apt-get update
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
SWBSanjeewa / jenkins-docker-compose
Created August 22, 2017 05:53
Run jenkins master and slave using docker compose
Master - jenkins-master-docker-compose.yml
image: jenkins:2.60.1
container_name: jenkins_master
restart: always
- "80:8080"
vgeshel / function.js
Last active February 9, 2022 09:19
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = '';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
7rin0 / gist:ea890d2d4bf25a890b86aff01290e7d0
Created March 3, 2017 01:52
Docker exec root or default user
# Root.
$ docker exec -u 0 i -t {container_id/image_name} bash
# Default container's user.
$ docker exec i -t {container_id/image_name} bash