Skip to content

Instantly share code, notes, and snippets.

View grase123's full-sized avatar

Sergey Gr grase123

View GitHub Profile
@grase123
grase123 / ANSI.md
Created January 10, 2026 19:12 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@grase123
grase123 / bash-colors.md
Created January 10, 2026 10:23 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@grase123
grase123 / sed_snippets.sh
Created June 15, 2024 18:09 — forked from r2k0/sed_snippets.sh
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file
@grase123
grase123 / update_confluence.py
Created September 14, 2023 12:39 — forked from andymotta/update_confluence.py
Update/create a page containing a table w/ Confluence REST API
#!/usr/bin/env python
'''
Update/create a page containing a table w/ Confluence REST API
'''
import requests
import json
# Get api credentials from local config file
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
@grase123
grase123 / cloud-init.yaml
Created April 24, 2022 20:52 — forked from ngaffa/cloud-init.yaml
Cloud Init for K8s and Docker
#cloud-config
package_update: true
package_upgrade: true
packages:
# Update the apt package index and install packages needed to use the Docker and Kubernetes apt repositories over HTTPS
- apt-transport-https
- ca-certificates
- curl
- gnupg
- lsb-release
@grase123
grase123 / gist:d39f9b5e289980280c0aba410c4b913a
Created October 17, 2021 22:08 — forked from carlspring/gist:6762356
TeamCity REST API Commands
@grase123
grase123 / install-Python-AmazonLinux-20171023.log
Created April 16, 2021 08:41 — forked from mrthomaskim/install-Python-AmazonLinux-20171023.log
Amazon Linux AMI, pyenv, virtualenv, Python, ... Hello, World!
### prerequisites
sudo yum groupinstall "Development Tools"
git --version
gcc --version
bash --version
python --version # (system)
sudo yum install -y openssl-devel readline-devel zlib-devel
sudo yum update
### install `pyenv`
@grase123
grase123 / cf_create_or_update.py
Created March 18, 2021 11:55 — forked from svrist/cf_create_or_update.py
Update or create a CloudFormation stack given a name and template + params'
'Update or create a stack given a name and template + params'
from __future__ import division, print_function, unicode_literals
from datetime import datetime
import logging
import json
import sys
import boto3
import botocore