Skip to content

Instantly share code, notes, and snippets.

View vdugnist's full-sized avatar

Vlad Dugnist vdugnist

View GitHub Profile
@vdugnist
vdugnist / croppy.sh
Last active January 30, 2017 13:24
Small script for video crop.
#!/bin/bash
# Small script for video crop. It takes a file as an argument.
# File format: source_name start_time end_time destination_name
# Example: GOPR0766.MP4 16:50 17:10 example
folder_name="croppy_result"
array_contains() {
local e
for e in "${@:2}"; do
@vdugnist
vdugnist / vimrc
Last active September 11, 2017 08:41
" System
set encoding=utf8
set nobackup
" Use case insensitive search, except when using capital letters
set ignorecase
set smartcase
set hlsearch
" Syntax highlight
@vdugnist
vdugnist / setup.sh
Last active November 28, 2021 14:15
#!/bin/bash
# check if user logged in into appstore
read -p "Check if you are logged in into AppStore. Press enter to continue ↵"
# install oh my zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@vdugnist
vdugnist / uiimage_check.sh
Last active February 11, 2021 06:42
Check if UIImage exists in assets
#!/bin/bash
CLASSES_FOLDERS=($PROJECT_NAME)
RESOURCE_FOLDER=$PROJECT_NAME
function show_code {
for ClassFolder in "${CLASSES_FOLDERS[@]}"; do
# try to find image name in [UIImage imageNamed:] pattern
ERROR_LOCATION=$(grep -Ron "\[UIImage imageNamed:@\"$1\"]" $ClassFolder)
if [[ -n $ERROR_LOCATION ]]; then break; fi;
@vdugnist
vdugnist / check-categories-compiled.rb
Last active April 13, 2018 22:36
Check that imported category exists in targets compile source.
require 'xcodeproj'
require 'set'
SOURCE_FOLDER=ARGV[0] ? ARGV[0] : ENV['PROJECT_DIR']
PROJECT_PATH=ARGV[1] ? ARGV[1] : ENV['PROJECT_FILE_PATH']
if !SOURCE_FOLDER || !PROJECT_PATH then
puts "usage: ruby check-categories_compiled.rb source_folder project_path"
exit 1
end
echo "gem: --user-install -n~/bin --no-document" > ~/.gemrc
echo "PATH=~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" > ~/.bash_profile
. ~/.bash_profile
@vdugnist
vdugnist / compress_video_folder.sh
Created April 1, 2018 08:02
Compress video folder
#!/bin/bash
if [[ ! $1 ]]; then
echo "directory path is required"
exit 1
fi
dir_path=$1
# remove last '/' if needed
#!/bin/bash
function exclude_odd_folders_and_format {
egrep -v "^Pods|^tools" | tr '\n' '\0' | xargs -0 clang-format -i -style=file
}
export -f exclude_odd_folders_and_format
if [ $# -eq 0 ]; then
find . -type f -name *.h -o -name *.m -o -name *.mm | sed "s/^\.\///g" | exclude_odd_folders_and_format
exit 0

Privacy Policy

Vladislav Dugnist built the Rollerschool app as a Free app. This SERVICE is provided by Vladislav Dugnist at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Rollerschool unless otherwise defined in this Privacy Policy.