Skip to content

Instantly share code, notes, and snippets.

View Kami-no's full-sized avatar

Dmitry Zinin Kami-no

View GitHub Profile
#!/bin/bash
# Power-line
PS1_col() {
case "$1" in
black) echo 0;;
red) echo 1;;
green) echo 2;;
yellow) echo 3;;
blue) echo 4;;
# ansible-playbook useradd.yml -e user_name=user -i hproduction -l any.host.net
---
- hosts:
- all
gather_facts: false
become: true
# vars:
# user_name: ""
# user_state: ""
@Kami-no
Kami-no / nginx-rps.sh
Created October 31, 2018 20:51
nginx rps one-liner
#!/bin/bash
tail /var/log/nginx/kami-no_ru.error.log | awk '{print substr($0,0,19)}' | sort | uniq -c | sort
{
"annotations": {
"list": [
{
"$$hashKey": "object:135",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
# cat /etc/tmpfiles.d/gitlab.conf - for personal use
# cat /usr/lib/tmpfiles.d/gitlab.conf - for package devs
d /run/gitlab 0755 git git
# cat /etc/systemd/system/gitlab-unicorn.service - for personal use
# cat /var/lib/systemd/system/gitlab-unicorn.service - for package devs
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################
# cat /etc/systemd/system/gitlab-sidekiq.service - for personal use
# cat /var/lib/systemd/system/gitlab-sidekiq.service - for package devs
#####################################################
#
# GitLab version : 5.x - 7.x
# Contributors : davispuh, mtorromeo, axilleas, boeserwolf91, Stefan Tatschner (rumpelsepp)
# Downloaded from : https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init/systemd
#
####################################################