Skip to content

Instantly share code, notes, and snippets.

View lpsm-dev's full-sized avatar
🌊
Trying to... what?

:) lpsm-dev

🌊
Trying to... what?
  • 0.0.0.0
View GitHub Profile
@briceburg
briceburg / Dockerfile.fails
Created March 30, 2016 22:17
docker - example adding www-data user to alpine images
FROM nginx:alpine
# stock verison from php:alpine image
# ensure www-data user exists
RUN set -x \
&& addgroup -g 82 -S www-data \
&& adduser -u 82 -D -S -G www-data www-data
# 82 is the standard uid/gid for "www-data" in Alpine
# http://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.3.2
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@jagrosh
jagrosh / Growing A Discord Server.md
Last active November 28, 2025 14:11
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@sizgiyaev
sizgiyaev / clone_gitlab_repos.sh
Created December 5, 2017 10:21
Clone all gitlab repos from the given organization
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="orgname"
BASE_PATH="gitlab_url"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"
@mak3r
mak3r / upgrade.sh
Created November 15, 2018 21:05
Rancher v2.x single node upgrade
#!/bin/bash
# based on
# https://rancher.com/docs/rancher/v2.x/en/upgrades/upgrades/single-node-upgrade/
RANCHER_CONTAINER_NAME=$1
RANCHER_CONTAINER_TAG=$2
RANCHER_VERSION=$3
RANCHER_UPGRADE_VERSION=$4
@ServerlessBot
ServerlessBot / IAMCredentials.json
Last active February 24, 2025 15:51
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@saidsef
saidsef / gitlab-container-scanning.md
Last active January 2, 2023 13:27
Container Security: GitLab Trivy Container Scanning

A Simple and Comprehensive Vulnerability Scanner for Containers, Suitable for CI.

It is considered to be used in CI. Before pushing to a container registry, you can scan your local container image easily.

Most of my Docker images are Alpine based. Trivy uses better vulnerability data for Alpine compared to Clair.

This can be easily plugged in to you CI/CD pipeline - in the scenario we we allow the pipeline to fail, the objective here is to provide visibility.