Skip to content

Instantly share code, notes, and snippets.

View SweetOps's full-sized avatar
🖖

Volodymyr S. SweetOps

🖖
View GitHub Profile
#!/usr/bin/env bash
# From https://github.com/kubernetes/AWS/issues/226#issuecomment-278879348
# and https://github.com/kubernetes/AWS/blob/master/docs/mfa.md
# set -euo pipefail
main() {
local role_arn="${AWS_MFA_ROLE_ARN:-}"
local serial_number="${AWS_MFA_ARN:-}"
@SweetOps
SweetOps / gist:b945d25bbb5f4f8cf6d3bcc8a7f4ab4b
Created January 8, 2019 08:54 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
1. Rename your local branch.
If you are on the branch you want to rename:
1
git branch -m new-name
If you are on a different branch:
1
git branch -m old-name new-name
2. Delete the old-name remote branch and push the new-name local branch.
### Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
@SweetOps
SweetOps / gist:0f74ef70cbe06bf08c2d366adbd1fce3
Created April 3, 2020 15:23
GitHub-org-to-gitea-mirror
from github import Github
import os
import json
import requests
#Github
GH_ACCESS_TOKEN = os.environ['GH_ACCESS_TOKEN']
GH_ORG_NAME = ''
GITHUB_USER = ''
#Gitea
@SweetOps
SweetOps / nginx.conf
Created August 21, 2020 13:31 — forked from dctrwatson/nginx.conf
Caching PyPi packages locally with nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@SweetOps
SweetOps / jenkins-plugins.md
Created November 25, 2020 15:24 — forked from noqcks/jenkins-plugins.md
How to get a complete plugin list from jenkins (with version)

I need a way to get a list of plugins so that I can use them with docker jenkins in the format <plugin>: <version>

1. get the jenkins cli.

The jenkins CLI will allow us to interact with our jenkins server from the command line. We can get it with a simple curl call.

curl 'localhost:8080/jnlpJars/jenkins-cli.jar' > jenkins-cli.jar
@SweetOps
SweetOps / nodelocaldns.json
Created December 1, 2021 10:32
Grafana dashboard for NodeLocalDNS
{
"__inputs": [ ],
"__requires": [ ],
"annotations": {
"list": [ ]
},
"editable": false,
"gnetId": null,
"graphTooltip": 0,
"hideControls": false,
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",