Skip to content

Instantly share code, notes, and snippets.

View gavvvr's full-sized avatar
🥷
Taming complexity

Kirill Gavrilov gavvvr

🥷
Taming complexity
View GitHub Profile
@liamcain
liamcain / obsidian-debug-mobile.js
Last active April 22, 2024 05:57
Save console messages to logfile for mobile debugging
declare module "obsidian" {
interface App {
isMobile: boolean;
}
}
// Call this method inside your plugin's `onLoad` function
function monkeyPatchConsole(plugin: Plugin) {
if (!plugin.app.isMobile) {
return;
@rishavpandey43
rishavpandey43 / git-commit-styleguide.md
Last active May 22, 2024 10:32
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

@msauza
msauza / spring-boot-docker.md
Last active May 8, 2024 08:59
Multi-Layer, Multi-Stage: Spring Boot application with Docker.

Overview

Spring Boot applications can run within a container by Multi-Layer based approach. Each layer may contain different parts of the application such as dependencies, source code, resources and even snapshot dependencies.

In the other hand, with Multi-Stage Build approach, any application can be built at a separate image from the final image that will contain the runnable application.

Spring Boot Docker

Multi-Layer

@sgyyz
sgyyz / uao.sh
Created March 15, 2019 07:50
uao.sh
#!/bin/sh
fullFileName=$1
suffix=${fullFileName#*.}
if [ "$suffix" != "zip" ];then
echo "Must be a valid zip file"
else
filename=${fullFileName%.*}
@freyacodes
freyacodes / Dockerfile
Created October 19, 2018 23:57
Teamcity Java 11 agent
FROM jetbrains/teamcity-agent
RUN apt update && apt install wget && \
wget -c https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz && \
tar -xvf openjdk-11_linux-x64_bin.tar.gz && \
rm openjdk-11_linux-x64_bin.tar.gz && \
mkdir -p /usr/lib/jvm/jdk-11 && \
mv jdk-11*/* /usr/lib/jvm/jdk-11/ && \
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-11/bin/java" 1020 && \
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-11/bin/javac" 1020 && \
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 24, 2024 16:16
set -e, -u, -o, -x pipefail explanation

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@elsonrodriguez
elsonrodriguez / README.md
Last active May 8, 2020 15:42
Minikube service routes

Setting up Minikube to have routable Cluster IPs and External IPs

This guide will show you how to access services within your minikube instance.

Accessing Cluster IPs

First, we will need to add a route to minikube.

This oneliner gets the ClusterIP range from etcd and adds a route.