Skip to content

Instantly share code, notes, and snippets.

View 0x00dec0de's full-sized avatar

Sukhorukov Olexandr 0x00dec0de

View GitHub Profile
@0x00dec0de
0x00dec0de / gist:0ed5d6a44ab7effcea9a2d863ca53d2d
Created November 16, 2022 14:01 — forked from RichiH/gist:f2ffb824d428d8ca0c7c40cd62022b56
Prometheus relabelling to get rid of port number
============================================
============================================
============================================
This does what it should:
regex: (.+?)(:80)?
Also see https://golang.org/pkg/regexp/syntax/
@0x00dec0de
0x00dec0de / starship.toml
Created November 1, 2022 13:38 — forked from pythoninthegrass/starship.toml
Starship prompt setup
# SOURCE: https://starship.rs/config
# DEBUG via: `starship explain`
# Timeout for commands executed by starship (ms)
command_timeout = 2000
# Replace the "❯"
[character]
success_symbol = "[λ](green)"
@0x00dec0de
0x00dec0de / docker-compose.yml
Created October 19, 2022 21:32 — forked from cspinetta/docker-compose.yml
Promtail example extracting data from json log
version: "3.6"
services:
promtail:
image: grafana/promtail:1.4.0
container_name: promtail
command: [ "-config.file=/etc/promtail/local-config.yaml" ]
volumes:
- './promtail.yml:/etc/promtail/local-config.yaml:ro'
- '__path_to_logs_directory__:/app/log:ro'
@0x00dec0de
0x00dec0de / delete_git_submodule.md
Created August 24, 2022 07:44 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@0x00dec0de
0x00dec0de / init.vim
Created June 13, 2022 17:47 — forked from joshuarubin/init.vim
Minimal neovim configuration for go (golang)
" Minimal neovim configuration for go
"
" deoplete requires neovim, so this will not work with regular vim
"
" prereqs:
" - neovim
" - neovim python3 (pip3 install --upgrade neovim)
"
" includes:
" - syntax checking on save (using neomake, go and gometalinter)
%zabbix ALL=(ALL) NOPASSWD: /usr/sbin/rabbitmqctl
@0x00dec0de
0x00dec0de / generate-app-icons.sh
Created January 15, 2022 21:18 — forked from rannerboy/generate-app-icons.sh
Generate app icons for Android and iOS
#!/bin/bash
# Create directories that don't exist
mkdir -p ios
mkdir -p android
mkdir -p itunes
mkdir -p google-play
# iOS icons
convert icon-template-ios.png -resize 167x ios/Icon-167.png
#!/bin/bash
# https://stackoverflow.com/questions/52736877/how-can-i-create-app-icons-for-all-supported-ios-android-sizes
echo $1
DIR=$(dirname $1)
echo $DIR
output="$DIR/$2"
echo $output
@0x00dec0de
0x00dec0de / bash_strict_mode.md
Created January 5, 2022 19:37 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation