Skip to content

Instantly share code, notes, and snippets.

View sajjadG's full-sized avatar
☺️
Feeling Good

Sajjad Gerami sajjadG

☺️
Feeling Good
View GitHub Profile
@sajjadG
sajjadG / defaults.yml
Last active August 8, 2022 06:58 — forked from devster31/swap.yml
Ansible role for creating a Swap file
swap_space: 2G
@sajjadG
sajjadG / .gitlab-ci.yml
Created April 11, 2022 06:51
.gitlab-ci.yml example1
image: docker:19.03.12
# services:
# - docker:19.03.12-dind
variables:
# DOCKER_DRIVER: overlay2
# DOCKER_TLS_CERTDIR: ""
PROJECT_NAME: my-project
@yokawasa
yokawasa / ghcr.md
Last active March 28, 2024 14:32
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@sajjadG
sajjadG / create-cloud-template.sh
Last active May 9, 2021 19:13 — forked from Oratorian/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr0
@Oratorian
Oratorian / create-cloud-template.sh
Last active January 4, 2023 21:07 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@rsperl
rsperl / Makefile #snippet
Last active April 17, 2024 23:02
self-documenting makefile with colors
SHELL=/bin/bash
# to see all colors, run
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done'
# the first 15 entries are the 8-bit colors
# define standard colors
ifneq (,$(findstring xterm,${TERM}))
BLACK := $(shell tput -Txterm setaf 0)
RED := $(shell tput -Txterm setaf 1)
@aleksandar-babic
aleksandar-babic / nginx-vhost.conf
Created June 20, 2018 09:20
Wordpress behind NGINX reverse proxy
location /blog/ {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass https://test-blog.bitstarz.com/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
@fabiomontefuscolo
fabiomontefuscolo / xz.markdown
Last active March 21, 2024 22:01
XZ and tricks

XZ

  1. Compress a file (filename.sql will be replaced by filename.sql.xz)
xz filename.sql
  1. Uncompress file (filename.sql.xz will be replaced by filename.sql)
version: '2'
services:
roach-ui:
image: cockroachdb/cockroach:beta-20161215
command: start --insecure
ports:
- 8080:8080
networks:
- roachnet
@yannhowe
yannhowe / .gitlab.ci.yml
Created September 26, 2016 18:06
.gitlab.ci.yml for SSH with private key.
# Image neeeds to have ssh-client
image: docker:git
services:
- docker:dind
stages:
- staging
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY