Skip to content

Instantly share code, notes, and snippets.

View alisson276's full-sized avatar

Alisson Ramos de Oliveira alisson276

  • Euronext Corporate Services
  • Portugal
  • 08:14 (UTC +01:00)
  • X @alisson_aro
View GitHub Profile
@max-i-mil
max-i-mil / linux-vms-on-apple-m1-with-networking.md
Last active May 7, 2024 01:05
Short summary to run Linux VMs on an Apple M1 host using QEMU, libvirt and HVF with a working network setup

Linux Virtual Machines with Private Network on an Apple M1 Device

Background

The aim was to be able to:

  1. Run multiple Linux VMs on an Apple M1/ARM device
  2. Use Apple's HVF for native performance speeds
  3. Configure VMs to allow network access to each other
  4. Configure VMs to allow access to the internet
  5. Not rely on custom modifications of software
# Source: https://gist.github.com/838a3a716cd9eb3c1a539a8d404d2077
######################################
# Using Loki To Store And Query Logs #
######################################
##########################################################
# Installing Loki, Grafana, Prometheus, And The Demo App #
##########################################################
@troyfontaine
troyfontaine / 1-setup.md
Last active June 15, 2024 09:10
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

from __future__ import print_function
import random
HANGMANPICS = ['''
+---+
| |
|
|
|
|
@chrishorton
chrishorton / hangmanwordbank.py
Created May 21, 2017 17:16
Hangman ascii art and wordbank
HANGMANPICS = ['''
+---+
| |
|
|
|
|
=========''', '''
+---+
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 17, 2024 05:28
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ravibhure
ravibhure / git_rebase.md
Last active June 4, 2024 15:02
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@efrecon
efrecon / run.tpl
Last active May 30, 2024 03:12
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@gene1wood
gene1wood / log_aws_lambda_event_and_context.py
Last active June 27, 2023 04:33
A python AWS Lambda function which logs the contents of the event and context variables passed into the function.
from __future__ import unicode_literals
import logging
import json
logger = logging.getLogger(__name__)
logging.getLogger().setLevel(logging.INFO)
class PythonObjectEncoder(json.JSONEncoder):
"""Custom JSON Encoder that allows encoding of un-serializable objects