Skip to content

Instantly share code, notes, and snippets.

View itunesLinks.sh
@vdugnist
vdugnist / croppy.sh
Last active Jan 30, 2017
Small script for video crop.
View croppy.sh
#!/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
View vimrc
" System
set encoding=utf8
set nobackup
" Use case insensitive search, except when using capital letters
set ignorecase
set smartcase
set hlsearch
" Syntax highlight
View configure_ruby
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
View compress_video_folder.sh
#!/bin/bash
if [[ ! $1 ]]; then
echo "directory path is required"
exit 1
fi
dir_path=$1
# remove last '/' if needed
@vdugnist
vdugnist / check-categories-compiled.rb
Last active Apr 13, 2018
Check that imported category exists in targets compile source.
View check-categories-compiled.rb
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
View rollerschool_privacy_policy.md

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.

View run_clang_format.sh
#!/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
@vdugnist
vdugnist / Spacedust.xccolortheme
Last active Mar 11, 2020
Spacedust.xccolortheme
View Spacedust.xccolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.052 0.489 0.482 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.432 0.325 0.276 1</string>
@vdugnist
vdugnist / uiimage_check.sh
Last active Feb 11, 2021
Check if UIImage exists in assets
View uiimage_check.sh
#!/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;