Skip to content

Instantly share code, notes, and snippets.

View gforien's full-sized avatar

Gabriel Forien gforien

  • INSA Lyon
  • Lyon, France
  • 02:11 (UTC +02:00)
View GitHub Profile
#you have to put this in $profile or $profile.currentuserallhosts
$esc = [char]27
if($env:WT_SESSION){
$prevprompt = $Function:prompt
function prompt {
if ($pwd.provider.name -eq "FileSystem") {
$p = $pwd.ProviderPath
Write-host "$esc]9;9;`"$p`"$esc\" -NoNewline
}
@kharandziuk
kharandziuk / terraform-presigned-url.tf
Created June 25, 2020 11:50
A hack to generate a presigned url in terraform
variable "bucket_name" {
default = "max-bucket-for-testing"
}
provider "aws" {
region = var.aws_region
profile = var.aws_profile
}
resource "aws_s3_bucket" "artifacts" {
@npearce
npearce / install-docker.md
Last active April 9, 2024 12:48
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@fnky
fnky / ANSI.md
Last active April 17, 2024 23:39
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@tomdaley92
tomdaley92 / rsub_setup.md
Last active July 19, 2021 11:16
Installing and configuring rsub for editing files with sublime through ssh
  1. Install rmate on the remote server
sudo wget -O /usr/local/bin/rsub https://raw.github.com/aurora/rmate/master/rmate && sudo chmod a+rx /usr/local/bin/rsub
  1. Modify your ~/.ssh/config file on your local machine
Host *
@shortjared
shortjared / list.txt
Last active April 17, 2024 18:58
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS.md
Last active March 8, 2024 17:34
Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

Update 28 July 2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Update 23 May 2020: This guide is ALREADY OUTDATED and might no longer work with new versions of Ubuntu and VirtualBox. Please consider switching to the updated guide instead. I will no longer respond to the replies to this gist. Thank you.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

@pauliusef
pauliusef / gist:c7bcc96481fb3113cc78ae1246901e6f
Created August 15, 2017 09:16
Select every second line in Sublime
Search for : (.*(\n|$)){2}
alt+R - to toggle regular expression search
alt+ENTER - to select all results
@toschneck
toschneck / install_docker_bash_completions.sh
Last active April 2, 2024 12:41
Install Docker and Docker-Compose bash completion
#!/usr/bin/env bash
set -e
echo "install docker bash completion"
curl -L https://raw.githubusercontent.com/docker/docker/v$(docker version --format '{{.Server.Version}}')/contrib/completion/bash/docker -o /etc/bash_completion.d/docker
echo "install docker-compose bash completion"
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
echo ".... done!"
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active March 11, 2024 16:24
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)