Skip to content

Instantly share code, notes, and snippets.

View butuzov's full-sized avatar
🇺🇦

Oleg Butuzov butuzov

🇺🇦
View GitHub Profile
@butuzov
butuzov / northwind.sql
Created November 12, 2023 15:46
postgress northwind.sql
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
@butuzov
butuzov / cloudSettings
Last active February 6, 2022 17:09
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-02-06T17:08:58.756Z","extensionVersion":"v3.4.3"}
package main
func main() {}
//nolint:deaccode
func add(a, b int) int {
a += 10
b += 11
return a + b
}
@butuzov
butuzov / spotty.sh
Created January 7, 2020 15:27 — forked from nl5887/spotty.sh
#!/usr/bin/env bash
AWS_CLI="aws --region $AWS_REGION"
PRICE=0.2
USER_NAME=#USERNAME#
KEY_NAME=#KEY NAME#
SECURITY_GROUP_ID=#SECURITY GROUP#
SUBNET_ID=#SUBNET#
VOLUME_SIZE=40
INSTANCE_TYPE=t2.2xlarge

Output of dinamic inventory.

> ./hosts
{
    "kube-master": [
        "master-1"
    ],
    "kube-node": [
        "node-sml-1",
@butuzov
butuzov / version_compare.sh
Created August 16, 2019 08:34
(bash) Compare Version in `Major.Minor.Patch`
# Compare two versions, in version format Major.Minor.Patch
# It doesn't validate version format, only compare values.
#
# Usage :
# version_compare <compared> <required>
#
# Example:
# version_compare 0.13.1 0.11.0
#
# returns
@butuzov
butuzov / readme.md
Last active November 11, 2019 11:55
Jupyter Notebook Go Kernel

Installing Go kernel for Jupyter notebooks

brew install zeromq
brew install pkg-config
https://github.com/gopherdata/gophernotes
go get -u github.com/gopherdata/gophernotes
mkdir -p ~/Library/Jupyter/kernels/gophernotes
p $GOPATH/src/github.com/gopherdata/gophernotes/kernel/* ~/Library/Jupyter/kernels/gophernotes
@butuzov
butuzov / gopak.md
Created February 24, 2019 09:15
`gopak` - Go PAth Kommander

Code

You can add this code to you .bashrc or something...

# Go PAth Commander?
# I am so terrible with pans-naming
# https://en.wikipedia.org/wiki/Hopak
gopak(){
@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL

Java Exception Example UnexceptableInputException.java

class UnexceptableInputException extends Exception{
	public UnexceptableInputException() {}

	public UnexceptableInputException(String message){
		super(message);
	}
}