Skip to content

Instantly share code, notes, and snippets.

View muocod's full-sized avatar
🙂

Sigma Devops muocod

🙂
View GitHub Profile
@mahdyar
mahdyar / cPanel.yml
Created September 8, 2021 20:56
Deploy to cPanel with GitHub Actions (FTP)
name: Deploy to cPanel
on:
push:
branches:
- master
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
@Dminor7
Dminor7 / azure_blob_storage_dataframe.py
Last active November 11, 2023 23:09
Upload DataFrame to Azure Blob Storage as CSV file and Download CSV file as dataframe. Azure Python v12.5.0
import os, uuid
from io import BytesIO
from datetime import datetime
from urllib.parse import urlparse
from azure.storage.blob import BlobServiceClient
import pandas as pd
def azure_upload_df(container=None, dataframe=None, filename=None):
"""
Upload DataFrame to Azure Blob Storage for given container
@ilap
ilap / grafana_telegram_bot.md
Last active July 16, 2024 11:43
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@bentesha
bentesha / haproxy-cheatsheet.cnf
Last active August 30, 2023 15:04
HA Proxy Cheatsheet
# Common fetches
# Match source IP address
acl is_malicious src 192.168.10.32
acl is_local_net src 192.168.32.0/24 # match IP range
# Match request path
acl is_api path -i -m beg /api # match paths starting with /api
acl is_image -i -m end .jpg .png .gif # match paths ending with .jpg .png and .gif extensions
acl is_health -i path_str /health # exact match path /health
@platinumthinker
platinumthinker / __recipe.md
Last active April 29, 2024 07:56
Cassandra backup/restore

Backup:

  1. Create snapshot:

> nodetool snapshot thingsboard (or you cat set you namespace) Requested creating snapshot(s) for [all keyspaces] with snapshot name [1522059918232] and options {skipFlush=false} Snapshot directory: 1522059918232

  1. Copy snapshot on another directory:
@ryantbrown
ryantbrown / s3upload.sh
Created February 1, 2018 07:25
Bash script to Upload folder to S3
# Set AWS credentials and S3 paramters
AWS_KEY=""
AWS_SECRET=""
S3_BUCKET=""
S3_BUCKET_PATH="/"
S3_ACL="x-amz-acl:private"
function s3Upload
{
path=$1
@andrewsomething
andrewsomething / BACKUP.md
Last active March 28, 2023 08:30
Backup GitLab to DigitalOcean Spaces

Backup GitLab to DigitalOcean Spaces

GitLab uses Fog to communicate with various object storage services when running backups. Fog works with S3 as well as S3-compatible services like Spaces. The key difference is that you need to explictly set the endpoint for non-S3 services. If you are using the "ominbus" GitLab packages, you would need to add the following to /etc/gitlab/gitlab.rb:

gitlab_rails['backup_upload_connection'] = {
@styblope
styblope / docker-api-port.md
Last active November 15, 2024 23:06
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@jpswade
jpswade / devops_best_practices.md
Last active October 30, 2024 15:05
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing