Skip to content

Instantly share code, notes, and snippets.

View holms's full-sized avatar

Roman Gorodeckij holms

View GitHub Profile
@holms
holms / plan.md
Last active July 8, 2019 23:17
Plan

As iskart noriu ispeti kad cia ieina beveik visa devops engineer'ingo geriausios praktikos (jos yra viesai zinomos ir istirtos per 50000 imoniu worldwide), ir cia tikrai nebus lengva suprasti. As jau taip bandziau abstraguotis ant kiek tik galejau ir tai tikrai nera lengva padaryti. Prasau klausk bet kokio termino kurio nesupranti. Cia yra metodologija ir as cia realiai atpasakoju savo darba. Ne techniniam zmogui tai pakankami didele informacine bomba.

Koks devops tikslas

Devops praktikos skirtos pagreitinti produkto gamyba, pastatyti produkta ant konvejerio. Viska automatizuoti iki maksimumo ir sumazinti palaikymo kastus iki minimo, ko maziau human factor, to geriau, nebent nori procesa pagerinti.

  • Automatinis infrastrukturos pletimo igyvendinimas naudojant debesu (CLOUD) technologija. (Nuomojames resursus tiek kiek reikia is kitu, siuo atveju is AWS, pvz serveri su tiek ramais ir vieta kiek mums reikia, ir galimybe bet kada pakeisti jo konfiguracija, ir startuoti tiek serveriu kiek mums reikia musu sp
@holms
holms / terraform.tf
Created November 13, 2018 00:44
Terraform modules depends_on workaround
# File fancy-app-module/variables.tf
variable depends_on { default = [], type = "list"}
# File my-app.tf
module "app" {
source = "modules/fancy-app-module"
@holms
holms / virt-manager-osx
Last active January 31, 2019 23:38
Install virt-manager osx
git clone git://git.fedorahosted.org/virt-manager.git
cd virt-manager
sudo port -v install intltool py27-pygtk
sudo python setup.py install
@holms
holms / credstash.tf
Created November 13, 2018 00:46
Terraform credstash
Perfect free secrets manager approach
# Cli tool: https://github.com/fugue/credstash
# Setup module for DynamoDB/KMS: https://github.com/fpco/terraform-aws-foundation/tree/master/modules/credstash-setup
# Terraform credstash provider: https://github.com/sspinc/terraform-provider-credstash
@holms
holms / Dockerfile
Created September 7, 2018 20:06
problem with volumes
FROM bitnami/minideb-extras:stretch-r131
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
HOME="/"
# Install required system packages and dependencies
RUN install_packages libblkid1 libbsd0 libc6 libffi6 libgcc1 libglib2.0-0 libmount1 libpcre3 libselinux1 libstdc++6 libuuid1 libx11-6 libxau6 libxcb1 libxdmcp6 libxext6 zlib1g
RUN bitnami-pkg install java-1.8.181-1 --checksum 66bba4b4a2647f981339d306da796905c222057c4277a5ef045e079981a404f4
RUN bitnami-pkg unpack kafka-2.0.0-1 --checksum a5c583db6dce68f8c71e1f7bd3c927639ede08f8043cb699049041344c35449c
@holms
holms / dark.md
Created August 8, 2018 07:56 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@holms
holms / migrate-backend.sh
Created April 20, 2018 14:10
Splitting folder to separate git repositories
# So we have this situation: repo `app` which has `serverapp` folder inside which we want to convert to separate repo
rm -rf app
rm -rf app-server
git clone git@bitbucket.org:xxxx/app.git
cp -R app app-server
cd app-server
git filter-branch --prune-empty --subdirectory-filter serverapp master
echo node_modules/ >> .gitignore # For node.js only
git add .gitignore # For node.js only
git commit -m 'Remove node_modules from git history' # For node.js only
@holms
holms / gist:cf04b4b316e722aea7c801daffa3bcc1
Created April 20, 2018 10:22
Remove folder from git history
git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
git gc
git push origin master --force
@holms
holms / gist:1f4e55f61a32931e55ac5fc1e8bd623b
Created April 13, 2018 06:08
Bluetooth on raspberry pi
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:15:83:15:A3:10 Discovering: yes
[CHG] Device 7C:1E:52:0B:0D:97 LegacyPairing: yes
@holms
holms / gist:5e8b8774473241a4852e9d69df800441
Created April 13, 2018 06:07
Hook on one terminal input to another
script -f /dev/tty1