Skip to content

Instantly share code, notes, and snippets.

View lotyp's full-sized avatar

Andrij Orlenko lotyp

View GitHub Profile
@belgattitude
belgattitude / ci-pnpm-install.md
Last active April 13, 2024 14:14
Composite github action to improve CI time with pnpm

Why

Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).

Requirements

pnpm v7 or v8 (not using pnpm ? see the corresponding yarn action gist)

Bench

@nicolasdao
nicolasdao / open_source_licenses.md
Last active April 23, 2024 23:27
What you need to know to choose an open source license.
@nottrobin
nottrobin / git-force-clone.sh
Created November 8, 2016 09:57
git force-clone: clone a repository; if it already exists locally, reset it to a clone of the remote.
#! /usr/bin/env bash
set -euo pipefail
_usage() {
echo "
Usage:
git-force-clone -b branch remote_url destination_path
Example:
@KostyaEsmukov
KostyaEsmukov / _nginx_docker_config.md
Last active April 1, 2024 08:40
Nginx configuration sample for docker

Nginx production configuration sample

This config assumes that nginx is run from docker image _/nginx.

docker commands

docker network create nginx

mkdir -p /etc/myproject/nginx

cd /etc/myproject/nginx

@halberom
halberom / opt1_template.j2
Last active April 12, 2024 11:33
ansible - example of template if else
{# style 1 - long form #}
{% if filepath == '/var/opt/tomcat_1' %}
{% set tomcat_value = tomcat_1_value %}
{% else %}
{% set tomcat_value = tomcat_2_value %}
{% endif %}
{# style 2 - short form #}
{% set tomcat_value = tomcat_1_value if (filepath == '/var/opt/tomcat_1') else tomcat_2_value %}
@trusktr
trusktr / DefaultKeyBinding.dict
Last active April 21, 2024 06:32
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers