Skip to content

Instantly share code, notes, and snippets.

View MAHDTech's full-sized avatar
:shipit:

MAHDTech MAHDTech

:shipit:
View GitHub Profile
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active July 5, 2024 14:18
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@zyoutz
zyoutz / README.md
Last active March 2, 2021 10:12
Set icons for JetBrains Toolbox installed Applications (eg. IntelliJ, Goland, etc) on Chrome OS

This gist is a simple bash script for properly setting the icons for JetBrains applications installed with JetBrains Toolbox app on Chrome OS using Crostini (Linux Apps). Prior to running this script, make sure to install the Linux version of JetBrains Toolbox on your Chromebook:

  1. Download JetBrains Toolbox and share Downloads for Linux use
  2. Extract content: sudo tar -xvf jetbrains-toolbox-1.16.6067.tar.gz -C /opt/
  3. Run toolbox: cd /opt/jetbrains-toolbox-1.16.6067/ ; ./jetbrains-toolbox
  4. Install the JetBrains applications you expect to use
  5. Run configuration script: ./configure.sh

Once run, icons should now properly load instead of the default penguin icon. Unfortunatley every time a new update is applied to your IDEs this may be necessary, but at least you can quickly run the script instead of manually updating the desktop files.

@StevenACoffman
StevenACoffman / fluent-filebeat-comparison.md
Last active April 2, 2024 22:34
Fluentd Fluent-bit FileBeat memory and cpu resources

Fluent-bit rocks

A short survey of log collection options and why you picked the wrong one. 😜

Who am I? Where am I from?

I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?

Number what it means
101,332,633 unique visitors in 2017
@whiteinge
whiteinge / complex_salt_orchestrate.sls
Last active March 20, 2024 15:48
An example of a complex, multi-host Salt Orchestrate state that performs status checks as it goes
# /srv/salt/upgrade_the_app.sls
# Example of a complex, multi-host Orchestration state that performs status checks as it goes.
# Note, this is untested and is meant to serve as an example.
# Run via: salt-run state.orch upgrade_the_app pillar='{nodes: [nodeA, nodeB], version: 123}'
{% set nodes = salt.pillar.get('nodes', []) %}
{% set all_grains = salt.saltutil.runner('cache.grains',
tgt=','.join(nodes), tgt_type='list') %}
{# Default version if not given at the CLI. #}
@ELLIOTTCABLE
ELLIOTTCABLE / .gitignore
Last active July 14, 2023 15:34 — forked from rosston/.gitignore
BASH Script to keep Route53 updated with your current external IP address
*.ip
*.log
@FilBot3
FilBot3 / vault-server.hcl
Last active December 10, 2021 16:54
HashiCorp Vault SystemD Service Unit file
backend "file" {
path = "/opt/HashiCorp/Vault/secrets"
}
listener "tcp" {
address = "127.0.0.1:8200"
tls_disable = 1
}
@hemebond
hemebond / 0_article.md
Last active March 13, 2022 11:51
A SaltStack AWS Auto Scaling Solution

A SaltStack AWS Auto Scaling Solution

Overview

The AWS Auto Scaling Goup, configured with a customised Cloud-Init file, sends a notification to an SNS Topic, which in turn passes it onto an SQS queue that the Salt Master is subscribed to. A Reactor watches for the auto scaling events and pre-approves the new minion based on its Auto Scaling group name and instance ID.

Salt Master Configuration

@andresriancho
andresriancho / totp-secret-leak.md
Last active January 28, 2021 12:08
TOTP secrets leaked to Google via charts API

TL;DR

When implementing 2FA it's a bad idea to generate the QR image containing the TOTP secret using Google charts:

<img src="https://chart.googleapis.com/
          chart?chl=otpauth%3A%2F%2Ftotp%2F...secret%3Dacl...mwv&amp;chs=200x200&amp;cht=qr" />

Paranoid mode: ON

Google tracks all your internet moves and could easily exploit this vulnerability to bypass 2FA:

@roydq
roydq / ubuntu_unattended_upgrades_gmail.markdown
Last active February 2, 2024 17:01 — forked from dwilkie/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

@jzelinskie
jzelinskie / client.go
Last active October 27, 2021 03:37
grpc bidirectional streams in golang
package main
import (
"log"
"time"
"golang.org/x/net/context"
"google.golang.org/grpc"
pb "github.com/jzelinskie/grpc/simple"