Skip to content

Instantly share code, notes, and snippets.

View crasiak's full-sized avatar

Jonathan Stasiak crasiak

  • Lisbon
View GitHub Profile
@EronWright
EronWright / ca-certificate.ts
Last active January 28, 2022 15:26
Generate a CA Certificate using Pulumi
/*
Copyright (c) 2020 StreamNative. All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, see <https://opensource.org/licenses/MIT>.
*/
import * as pulumi from "@pulumi/pulumi";
import * as tls from "@pulumi/tls";
@asaphe
asaphe / aws_cognito_aes.md
Last active May 2, 2022 18:14
Amazon Elasticsearch - Kibana Access using AWS Cognito and Google Apps

Amazon Cognito for Amazon Elasticsearch Kibana access using SAML

That is a mouthful and the process could be clearer. doesn't help that there's a lot of outdated information and conflicting articles with links upon links pointing you in every which way but the right way.

I'll use Google Apps as a SAML provider for the purpose of this gist.

Overview of the steps

The process is triggered from the AES Console and required multiple steps to configure the IAM Roles and chosen IDP

@tilfin
tilfin / gist:bf0f96ea1f46594d83e5644412e9d3c9
Created September 8, 2018 16:34
Update all expired keys from Ubuntu key server in one command
```
sudo apt-key list | \
grep "expired: " | \
sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \
xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
```
### Command explanation:
sudo apt-key list - lists all keys installed in the system;
@mcastelino
mcastelino / Simple vsock setup for QEMU.md
Last active June 9, 2024 05:05
using qemu with vsock

Simple vsock setup for QEMU

Configuration

Host Kernel: rawhide 4.13.0-0.rc6.git4.2.fc28.x86_64 (on Fedora 24)

QEMU is mainline built from sources: QEMU emulator version 2.10.50 (v2.10.0-105-g223cd0e)

Guest: clear-17460-kvm.img (which has vsock support)

@ngm
ngm / packages.el
Last active November 13, 2019 21:44
Basic spacemacs org-brain layer
;; put this file in ~/.emacs.d/private/org-brain
;; then add org-brain into your dotspacemacs-configuration-layers in .spacemacs
(defconst org-brain-packages
'(org-brain)
)
;; see https://github.com/Kungsgeten/org-brain#setup-and-requirements
(defun org-brain/init-org-brain ()
(use-package org-brain
@andkirby
andkirby / slack.sh
Last active June 5, 2024 09:55
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@summerwind
summerwind / build-a-os-image-with-packer-and-qemu.md
Last active April 10, 2024 19:32
Build a OS image with Packer and QEMU

Build a OS image with QEMU and Ubuntu Cloud Image

Prerequirements

  • Packer
  • QEMU
  • Docker

Build an image of cloud-init settings

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?

@kuznero
kuznero / nixos-upgrade.md
Created March 30, 2017 19:10
Upgrading NixOS to v17.03

Upgrading NixOS

sudo nix-channel --add https://nixos.org/channels/nixos-17.03 nixos
sudo nix-channel --update
@ageis
ageis / systemd_service_hardening.md
Last active July 3, 2024 21:02
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict