Skip to content

Instantly share code, notes, and snippets.

View ArtemBernatskyy's full-sized avatar

Artem Bernatskyy ArtemBernatskyy

  • World
View GitHub Profile
@ArtemBernatskyy
ArtemBernatskyy / subler_tutorial.md
Created January 30, 2023 18:32
Overlapped Subtitles (Subler)

temporary fix using Subler (suitable for .mks files or .mkv files containing subtitle tracks)

  1. Download the latest Subler
  2. Open and go to Preferences > OCR > Download relevant languages
  3. Go to Preferences > Advanced, and make sure VobSub to Tx3g is enabled
  4. Select Open and open your MKS or MKV file
  5. Deselect all tracks except the subtitle track
  6. Choose File > Save, leave extension as .m4v and confirm
  7. It will now OCR the subtitles and save a .m4v file
  8. When it's done, highlight the subtitle track and choose File > EXPORT. This will save as .srt
@ArtemBernatskyy
ArtemBernatskyy / De-dobe.scpt
Created March 26, 2022 14:17 — forked from samhenrigold/De-dobe.scpt
Kill all Adobe CC daemons on app quit
-- Original script by Ted Wrigley (https://stackoverflow.com/questions/63786497/is-it-possible-to-run-an-automator-workflow-when-a-program-exits/69959340#69959340)
use framework "AppKit"
use scripting additions
property NSWorkspace : class "NSWorkspace"
property whitelist : {"com.adobe.ARM", "com.adobe.Acrobat", "com.adobe.Acrobat.Pro", "com.adobe.AdobePremierePro", "com.adobe.AfterEffects", "com.adobe.InCopy", "com.adobe.InDesign", "com.adobe.InDesignServer", "com.adobe.Lightroom2", "com.adobe.Lightroom3", "com.adobe.Muse.application", "com.adobe.Photoshop", "com.adobe.PhotoshopElements", "com.adobe.Reader", "com.adobe.bridge3", "com.adobe.bridge4", "com.adobe.bridge4.1", "com.adobe.dreamweaver-15.0", "com.adobe.dreamweaver-15.1", "com.adobe.dreamweaver-16.0", "com.adobe.dreamweaver-16.1", "com.adobe.estoolkit-3.0", "com.adobe.estoolkit-3.5", "com.adobe.estoolkit-3.6", "com.adobe.flash", "com.adobe.illustrator", "com.adobe.photodownloader", "com.adobe.pse11editor", "com.adobe.pse12editor", "com.adobe.pse9ed
@ArtemBernatskyy
ArtemBernatskyy / .gitignore
Created April 3, 2021 18:04 — forked from x3rAx/.gitignore
Gitignore with .gitkeep
# +----------------------------+
# | IDE files |
# +----------------------------+
/.idea
# +----------------------------+
# | Vagrant |
# +----------------------------+
/.vagrant
@ArtemBernatskyy
ArtemBernatskyy / desktop_activity.py
Created October 13, 2020 13:00 — forked from alexeiz/desktop_activity.py
Simulate desktop activity
#!/usr/bin/env python
import sys
import pyautogui
from datetime import datetime, timedelta
def move_rel(dx, dy, dur):
pyautogui.moveRel(dx, dy, dur, pyautogui.easeInQuad)
def square(side, dur):
class CustomNestedObject:
"""Custom weird class to handle __getitem__
TODO: add error handling for strings and other non list/tuple objects
"""
ERRORS = {
'element_doesnt_exist': "You don't have element with such index"
}
@ArtemBernatskyy
ArtemBernatskyy / models.py
Created April 13, 2018 15:56 — forked from jacobian/models.py
An example of using many-to-many "through" to augment m2m relationships. See http://www.quora.com/How-do-you-query-with-a-condition-on-a-ManyToMany-model-in-Django for context.
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Meta:
ordering = ['name']
def __unicode__(self):

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ArtemBernatskyy
ArtemBernatskyy / Django_ReactJS_Webpack_project_setup.md
Created November 17, 2017 08:54 — forked from Belgabor/Django_ReactJS_Webpack_project_setup.md
Set up a Django + ReactJS project with Webpack manager

Guide on how to create and set up your Django project with webpack, npm and ReactJS :)

Hopefully this will answer "How do I setup or start a Django project?" I was trying to set up my own website, and there was a lot to read, learn and digest! Therefore, I put this together which is a collection of all the guides/blog posts/articles that I found the most useful. At the end of this, you will have your barebones Django app configured and ready to start building :)

NOTE: This guide was built using Django 1.9.5, NodeJS 4+ with NPM 3+

1. Setting up your dev environment

@ArtemBernatskyy
ArtemBernatskyy / seed_pagination.py
Created November 3, 2017 00:51 — forked from bendavis78/seed_pagination.py
Example implementation of randomized pagination in django and django-rest-framework
"""
Adds a `seed` paramter to DRF's `next` and `prev` pagination urls
"""
from rest_framework import serializers
from rest_framework import pagination
from rest_framework.templatetags.rest_framework import replace_query_param
from . import utils
@ArtemBernatskyy
ArtemBernatskyy / disable.sh
Created October 4, 2017 10:40
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi