Skip to content

Instantly share code, notes, and snippets.

View flavienbwk's full-sized avatar

Flavien Berwick flavienbwk

  • Montréal, Canada
  • 17:55 (UTC -04:00)
View GitHub Profile
@deekayen
deekayen / .gitlab-ci.yml
Created August 3, 2020 21:19
Build a Docker container and then scan it with Quay Clair.
clair:
tags:
- kubernetes
stage: test
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375/
## Define two new variables based on GitLab's CI/CD predefined variables
## https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables
@chadmcrowell
chadmcrowell / kube-up.sh
Last active May 13, 2022 22:55
Install Kubernetes on Ubuntu 20.04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
@devops-school
devops-school / terraform-aws-ec2-instance-remote-exec-provisioner.tf
Created July 5, 2020 06:22
Terrafrom - Example Code for AWS ec2-instance and remote-exec provisioner
provider "aws" {
profile = "default"
region = "us-west-2"
}
resource "aws_key_pair" "example" {
key_name = "examplekey"
public_key = file("~/.ssh/terraform.pub")
}
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
#!/bin/bash
# Fixes a downloaded apt mirror
# See: https://github.com/apt-mirror/apt-mirror/issues/113#issuecomment-464932493
## first parameter is optional mirror list file
if [ "$1" != "" ]
then
mirrorlist=$1
else
@francoisruty
francoisruty / script.sh
Created June 29, 2019 14:41
Deep learning on Shadow PC
# Run those commands:
conda update conda
conda update anaconda
conda update python
conda update –all
conda create –name tf-gpu
cmd
activate tf-gpu
conda install -c aaronzs tensorflow-gpu #(note: this channel proposes a recent Tensorflow binary for windows)
conda install -c anaconda cudatoolkit
@abdennour
abdennour / README.md
Last active April 18, 2024 06:48
Nginx Reverse Proxy for Nexus Docker Registries

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@noelbundick
noelbundick / Dockerfile
Last active March 28, 2024 12:26
Consuming packages from a private Azure Pipelines Python artifact feed
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image
FROM python:3.6-alpine AS builder
ARG INDEX_URL
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL
COPY requirements.txt .
RUN pip install -U pip \
&& pip install --user -r requirements.txt
@pjobson
pjobson / remove_usb_guard.md
Last active March 19, 2024 19:54
Remove USB Guard From Ubuntu

Remove USB Guard From Ubuntu

If you're a sucker like me and installed usbguard on a Ubuntu variant you may find that you will have access to none of your usb devices at all, because F you. The installer automatically sets up the daemon which has no rules so will just block all of your devices. Doing a basic apt remove usbguard may fail at 25%, because also F you.

My kernel is version 4.15.0-47-generic, not sure if this stopped working at some point or what.

Regain Access

sudo echo "allow id *:*" > /etc/usbguard/rules.conf

sudo sed -i 's/PresentDevicePolicy=apply-policy/PresentDevicePolicy=allow/' /etc/usbguard/usbguard-daemon.conf