Skip to content

Instantly share code, notes, and snippets.

View fortunto2's full-sized avatar

Rustam Salavatov fortunto2

View GitHub Profile
@fortunto2
fortunto2 / cuda_installation_on_ubuntu_18.04
Last active December 5, 2018 14:50 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
cuda 9.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.2 in ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@fortunto2
fortunto2 / Makefile
Created November 15, 2018 21:18 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@fortunto2
fortunto2 / init.toml
Created October 8, 2018 20:38
~/.SpaceVim.d/init.toml
[options]
default_indent = 4
enable_debug = 1
enable_ale = 0
# enable_ycm = 1
# snippet_engine = "ultisnips"
line_on_the_fly = 0
realtime_leader_guide = 1
enable_tabline_filetype_icon = 1
enable_os_fileformat_icon = 1

ffmpeg Cheatsheet

  • Join TS Files
  • Convert TS to MP4
  • Download Online AES-128 Encrypted HLS video
  • Convert Video to GIF
  • Extract Audio and Convert it to MP3
  • Burn Subtitles into Video

Join TS Files

@fortunto2
fortunto2 / uppy_nginx.md
Created September 26, 2018 15:11
Uppy server companion setting to nginx

I set this to solve wss error transloadit/uppy#1075


server {
        server_name uppy.xxxxx.com;
        charset utf-8;

 location / {
@fortunto2
fortunto2 / music2video.sh
Created August 5, 2018 20:53
Конвертируем много mp3 в цельную запись для ютуб
ffmpeg -i "concat:01.mp3|02.mp3|03.mp3|04.mp3|05.mp3|06.mp3|07.mp3|08.mp3|09.mp3|10.mp3|11.mp3|12.mp3|13.mp3|14.mp3|15.mp3|16.mp3|17.mp3|" -acodec copy output.mp3
ffmpeg -loop 1 -i img.jpeg -i output.mp3 -shortest -acodec copy ubik.mp4
@fortunto2
fortunto2 / attrs.py
Last active July 13, 2018 08:41
Сравнение двух способов создание классов с данными
import uuid
import datetime
import json
from typing import Callable, Dict, Iterable, List, Tuple
import attr
from pprint import pprint
@attr.s
class File:
hash = attr.ib(default=attr.Factory(dict))
@fortunto2
fortunto2 / sync-projects
Created June 30, 2018 07:53 — forked from JonasGroeger/sync-projects
Gitlab: Clone / Pull all projects in a group
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="YOUR_NAMESPACE"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""
PROJECT_SELECTION="select(.namespace.name == \"$NAMESPACE\")"
PROJECT_PROJECTION="{ "path": .path, "git": .ssh_url_to_repo }"
@fortunto2
fortunto2 / git-log.sh
Last active June 30, 2018 07:44
Лог git для печати в удобном виде
git log --pretty=format:"%h %ad%x09%an%x09%s" --date=short --author=fortunto2 --after="2018-06-01"