Skip to content

Instantly share code, notes, and snippets.

@yfix
yfix / docker-compose.yaml
Created October 14, 2021 19:18 — forked from 3ng1n33r/docker-compose.yaml
Zabbix 5.0 docker compose (with mysql database support)
version: '3.5'
services:
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-5.0-latest
container_name: zabbix-server
ports:
- "10051:10051"
networks:
zabbix_network:
ipv4_address: 172.18.0.5
@yfix
yfix / web-servers.md
Created October 3, 2020 17:40 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@yfix
yfix / encoding-video.md
Created May 27, 2020 12:26 — forked from Vestride/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@yfix
yfix / instructions.rst
Created May 7, 2020 14:10 — forked from Nachtalb/telegram-desktop-multiple-accounts.rst
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]

How to add multiple accounts to Telegram Desktop

Table of Contents

ATM of writing this, there is no way inside the Telegram Client to switch accounts (event though this feature exists in the offical mobile clients and there is a long running issue here: telegramdesktop/tdesktop#4261).

#!/usr/bin/env bash
# When eval'd, the output from script will export the AWS_ACCESS_KEY_ID and
# AWS_SECRET_ACCESS_KEY credentials from the a specific profile in
# ~/.aws/credentials.
#
# Usage:
#
# export-aws-credentials [PROFILE]
#
@yfix
yfix / multi-telegram.sh
Created September 25, 2019 09:22 — forked from AleksandrMihhailov/multi-telegram.sh
Run multiple Telegram client instances on macOS
# replace you in folder path with your macOS system account name
# create empty folder in your HOME path (replace empty_folder with your name)
/Applications/Telegram.app/Contents/MacOS/Telegram -many -workdir /Users/you/empty_folder
@yfix
yfix / k8s-cluster-resources.sh
Created September 12, 2019 12:08 — forked from geerlingguy/k8s-cluster-resources.sh
Monitor overall Kubernetes cluster utilization and capacity.
#!/bin/bash
#
# Monitor overall Kubernetes cluster utilization and capacity.
#
# Original source:
# https://github.com/kubernetes/kubernetes/issues/17512#issuecomment-367212930
#
# Tested with:
# - AWS EKS v1.11.5
#
@yfix
yfix / get_latest_release.sh
Created August 30, 2019 11:35 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@yfix
yfix / post-merge
Created November 21, 2018 11:48 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency using bower npm or composer
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# forked by Gianluca Guarini
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep -E --quiet "$1" && eval "$2"
}