Skip to content

Instantly share code, notes, and snippets.

View alekseypotapov-dev's full-sized avatar

Aleksey Potapov alekseypotapov-dev

View GitHub Profile
<?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>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
<?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>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAw
IDAAEAGAAtIQERITWiRjbGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVj
dF8QD05TS2V5ZWRBcmNoaXZlctEXGFRyb290gAEIERojLTI3O0FITltiaWttcn2GjpGa
@alekseypotapov-dev
alekseypotapov-dev / .swiftlint.yml
Created March 1, 2018 14:56
Currently using this swiftlint
# SwiftLint configuration file
#
# Used for DEBUG builds.
#
# rule identifiers to exclude from running
disabled_rules:
- line_length # to be used
- function_body_length
- type_body_length
@alekseypotapov-dev
alekseypotapov-dev / script.sh
Created May 4, 2018 10:27
Change spaces to underscore for all filenames in current folder
for f in *\ *; do mv "$f" "${f// /_}"; done
@alekseypotapov-dev
alekseypotapov-dev / cleaning.txt
Last active May 22, 2024 09:42
Cleaning mac from Xcode's files
Clean the following folders referring to http://ajithrnayak.com/post/95441624221/xcode-users-can-free-up-space-on-your-mac
~/Library/Developer/Xcode/DerivedData
~/Library/Developer/Xcode/Archives
~/Library/Developer/Xcode/iOS DeviceSupport
~/Library/Developer/CoreSimulator
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/MobileSync/
xcrun simctl delete unavailable
Start by adding a label to your LaunchScreen.storyboard:
Format the label however you like. I like to use something subtle that you can read when you need to but that isn’t very noticeable otherwise.
Set Document/Label to APP_VERSION. You will use this value in the Build Phase script.
Continue by adding the custom Build Phase:
Select your project in the upper-left-hand corner of Xcode.
@alekseypotapov-dev
alekseypotapov-dev / darth-vader-legacy.scpt
Created September 4, 2019 09:29
Apple Script to toggle between the Dark/Light mode on macOS
tell application "System Events" to tell appearance preferences to set dark mode to not dark mode
@alekseypotapov-dev
alekseypotapov-dev / whereAreTheBooks.txt
Created September 6, 2019 06:57
paths to iBooks folder
If you’ve enabled iCloud, they’re stored in Mobile Documents folder.
Here’s the full path to books you've added:
~/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/
Here's the full path to books purchased through the iBooks store:
~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks
The path is only accessible via Terminal. Going through Finder will only redirect you to the iCloud folder. So open up Terminal:
@alekseypotapov-dev
alekseypotapov-dev / rotate-pdfs.py
Last active January 15, 2020 17:34
Rotate all PDFs in a folder and put into another one
#!/usr/bin/env python3
import PyPDF2
import re
import sys
import os
import shutil
dir_path = os.getcwd()
rotatedDir_path = dir_path + '/rotated'
@alekseypotapov-dev
alekseypotapov-dev / unzip.txt
Created December 5, 2019 13:12
Terminal command to unzip archive where files have bad encoding names.
ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY