Skip to content

Instantly share code, notes, and snippets.

@ipmb
ipmb / notes.md
Created April 19, 2018 15:07
Running systemd in docker with Ubuntu 18.04

Trying to use kitchen-docker. It works great when passing privileged: true to the driver, but some hosted CI systems won't let you do that for security reasons. After trying a million different incantations, I got very close with:

image: ubuntu:18.04
run_options: --tmpfs=/run --tmpfs=/run/lock -v /sys/fs/cgroup/systemd:/sys/fs/cgroup/systemd --stop-signal=SIGRTMIN+3
run_command: /sbin/init

note: kitchen does some extra things like including -e container=docker

@leonardofed
leonardofed / README.md
Last active March 28, 2024 14:48
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active February 20, 2024 21:39
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@renoirb
renoirb / 0-STATE-RUN-SALT-API-GITHUB-HOOK-USE-CASE.md
Last active May 4, 2018 13:31
State runner on salt-api POST from GitHub push hook

Validate and run a state when a valid GitHub hook call has been received from salt-api

Idea is that we can setup salt-api to receive hook call from GitHub, and configured run stat.sls only if the request HMAC signature matche is successful.

Unfortunately most documentation says to deactivate salt-api hooks authentication (i.e. webhook_disable_auth: True) which is not a good idea.

This Gist is about finding a way to declare which state to run based on data GitHub sends on push hook. But ONLY if the request is valid.

Skeleton defines desired logic, see reactor_github_push.py below.

@ndpar
ndpar / SolrExporter.groovy
Last active November 16, 2016 12:44
Export documents from Solr core to XML format
#!/usr/bin/env groovy
/**
* Usage: ./SolrExporter.groovy query url [url]
*
* ./SolrExporter.groovy "id:12345" "http://your.solr.host:8983/solr/core/"
*
* ./SolrExporter.groovy "id:12345" "http://old.solr.host:8983/solr/core/" "http://new.solr.host:8983/solr/core/"
*
*
@jordelver
jordelver / gist:3073101
Created July 8, 2012 22:06
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port