Skip to content

Instantly share code, notes, and snippets.

View dgk's full-sized avatar
🇬🇪

Dmitry Kuksinsky dgk

🇬🇪
  • Georgia, Kobuleti
  • 06:28 (UTC +04:00)
View GitHub Profile
@dgk
dgk / digger.built-in approach.yml
Last active September 15, 2023 11:04
env matrix for digger
projects:
- name: dev
dir: envs/dev
workflow: dev
include_patterns:
- ../../modules/**
- name: stage
dir: envs/stage
workflow: stage
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@dgk
dgk / jq-cheetsheet.md
Created March 2, 2021 11:22 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
org.jenkinsci.plugins.plaincredentials.StringCredentials.class,
Jenkins.instance,
null,
null
);
for (c in creds) {
println( ( c.id + "=" + c.getSecret()))
}
@dgk
dgk / Dockerfile
Last active December 2, 2020 15:37
# nginx image with fake /bin/sh
# to use a non-standard port:
# docker build --build-arg PORT=8000 .
FROM nginx:alpine
ARG PORT=80
RUN sed -i "s/80/$PORT/" /etc/nginx/conf.d/default.conf
RUN apk add --no-cache bash
RUN echo -e '#!/bin/bash\nnginx -g "daemon off;"' > /bin/sh-fake
RUN chmod +x /bin/sh-fake
RUN mv /bin/sh-fake /bin/sh
@dgk
dgk / bluepill.cfg
Created October 16, 2020 19:50 — forked from hemalchevli/bluepill.cfg
OpenOCD config file for Bluepill STM32F103C8T6
#source [find interface/stlink-v2-1.cfg]
source [find interface/stlink-v2.cfg]
transport select hla_swd
source [find target/stm32f1x.cfg]
#reset_config srst_only
reset_config none separate
@dgk
dgk / nginx.conf
Created August 19, 2020 17:07 — forked from dctrwatson/nginx.conf
Caching PyPi packages locally with nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
sudo snap install code --classic
code --install-extension platformio.platformio-ide
@dgk
dgk / version-up.sh
Created June 22, 2020 13:51 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
# http://tldp.org/LDP/abs/html/comparison-ops.html