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
@devnoname120
devnoname120 / macos_docker_xorg_forwarding.md
Last active April 14, 2025 05:14
Xorg/X11 forwarding on macOS and docker

Xorg/X11 forwarding on macOS and docker

In order to run Xorg apps on macOS you will need to install xquartz:

brew install --cask --no-quarantine xquartz

And then configure it

@pjobson
pjobson / setup_cypress_wsl2.md
Last active April 19, 2025 04:57
Setting Up Cypress on Ubuntu WSL2
@liamcain
liamcain / obsidian-debug-mobile.js
Last active December 22, 2024 22:10
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;
@sindresorhus
sindresorhus / esm-package.md
Last active April 19, 2025 18:24
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@rishavpandey43
rishavpandey43 / git-commit-styleguide.md
Last active April 19, 2025 10:12
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 October 23, 2024 09:38
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 April 17, 2025 09:00
set -e, -u, -o, -x pipefail explanation