Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergei Silnov kumekay

View GitHub Profile
View freepbx-app.log
freepbx-app | Finished updating libraries!
freepbx-app | Generating CSS...Done
freepbx-app | Module pm2 version 15.0.3.7 successfully installed
freepbx-app | Updating Hooks...Done
freepbx-app | Chowning directories...Done
freepbx-app | Changing "SHOWLANGUAGE" from [0] to [1]
freepbx-app | ** [freepbx] Module Install: ucp
freepbx-app | No repos specified, using: [standard] from last GUI settings
freepbx-app |
freepbx-app | Downloading module 'ucp'
View self-signed-certificate-with-custom-ca-for-home-assistant.md

Create Root Certificate Authority and self-signed certificate for your Home Assistant. Compatible with Chrome browser > version 58 and macOS 10.15 Catalina

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@kumekay
kumekay / lvm-extend.sh
Created Sep 28, 2019
Extend root lvm partition on ubuntu 18.04
View lvm-extend.sh
#! /bin/sh
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
View .stignore
node_modules
dist_electron
log
build
.pioenvs
.piolibdeps
View local_appdata.py
import ctypes
from ctypes import wintypes, windll
CSIDL_LOCAL_APPDATA = 28
_SHGetFolderPath = windll.shell32.SHGetFolderPathW
_SHGetFolderPath.argtypes = [wintypes.HWND,
ctypes.c_int,
wintypes.HANDLE,
wintypes.DWORD, wintypes.LPCWSTR]
@kumekay
kumekay / photos_to_video.sh
Created Nov 3, 2018
ffmpeg photo series to video
View photos_to_video.sh
ffmpeg -r 3 -pattern_type glob -i '*.jpg' -c:v libx264 -vf "fps=25,format=yuv420p" video.mp4
@kumekay
kumekay / change_eb_ruby_version.sh
Last active Mar 19, 2019 — forked from januszm/change_eb_ruby_version.sh
Change Ruby minor version in AWS Elastic Beanstalk
View change_eb_ruby_version.sh
# Currently (03.2019) it's not possible to change the Ruby 'minor' version (eg. 2.3 => 2.4) using the web console
# However, it's possible using the 'awscli' tool.
# List of available platforms: https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-supported.html#platforms-supported.ruby
brew install awscli # pip install awscli
aws elasticbeanstalk update-environment \
--solution-stack-name "64bit Amazon Linux 2018.03 v2.9.1 running Ruby 2.6 (Puma)" \
--environment-name "***-dev-web" --region "us-east-1" --profile "***-dev"
@kumekay
kumekay / bme280.rb
Last active Mar 17, 2018
mruby + esp32 + thingspeak @ wroc_love.rb 2018
View bme280.rb
include ESP32
API_KEY = "****"
SSID = "****"
PASS = ""****"
i2c = I2C.new(I2C::PORT0, scl: 22, sda: 21).init(I2C::MASTER)
bme280 = SENSOR::BME280.new(i2c, 0x76)
bme280.init
@kumekay
kumekay / rename_phoenix_project.sh
Last active Jun 23, 2020 — forked from nerdyworm/rename.sh
rename a phoenix 1.3 project
View rename_phoenix_project.sh
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"
@kumekay
kumekay / erlang.sh
Created Oct 18, 2017
Ubuntu 16.04 (including WSL) Erlang compilation rather minimal dependencies
View erlang.sh
#!/bin/bash
sudo apt update
sudo apt install -y build-essential autoconf libncurses5-dev libssh-dev
You can’t perform that action at this time.