Skip to content

Instantly share code, notes, and snippets.

View inekipelov's full-sized avatar
🏠
Working from home

Roman Nekipelov inekipelov

🏠
Working from home
View GitHub Profile
@inekipelov
inekipelov / Earth.svg
Last active September 18, 2020 08:34
Source of SVG file for Earth image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@inekipelov
inekipelov / macos-terminal-gatekeeper.sh
Last active April 8, 2017 12:14 — forked from polster/macos-terminal-gatekeeper.sh
macOS: Allow Gatekeeper untrusted apps
# Check if a specific app has been quarantined by Gatekeeper
➜ ~ xattr Applications/Eclipse.app com.apple.quarantine
# Remove the app from the quarantine
➜ ~ sudo xattr -r -d com.apple.quarantine Applications/Eclipse.app
@inekipelov
inekipelov / xcode-build-bump.sh
Created February 21, 2018 20:32 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@inekipelov
inekipelov / tmp-universal-framework.sh
Last active January 13, 2019 12:17
tmp-universal-framework
# Script below required run from Aggregate Xcode target
# Settings
FRAMEWORK_NAME=#HERE_YOUR_FRAMEWORK_NAME
SCHEME_NAME="${FRAMEWORK_NAME}"
RELEASE_DIR="${HOME}/Desktop/Frameworks"
# Constants
OBJROOT="${OBJROOT}/DependentBuilds" # After that, xcodebuild manages to build this target without issues with new build system introduced in Xcode 10.
UNIVERSAL_OUTPUTFOLDER="${RELEASE_DIR}/${CONFIGURATION}-universal"
@inekipelov
inekipelov / SteelSeriesNimbus.plist
Last active September 18, 2020 09:19
Feral Interactive setup plist for SteelSeries Nimbus
<?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>CGPDeviceCategory</key>
<string>GamePad</string>
<key>CGPDeviceType</key>
<string>Xbox</string>
<key>DeviceName</key>
<string>SteelSeries Nimbus</string>
@inekipelov
inekipelov / update-version.sh
Created September 18, 2020 08:34 — forked from jellybeansoup/update-version.sh
Script for Incrementing Version Numbers
#!/bin/bash
# Link: <https://gist.github.com/jellybeansoup/db7b24fb4c7ed44030f4>
#
# A command-line script for incrementing build numbers for all known targets in an Xcode project.
#
# This script has two main goals: firstly, to ensure that all the targets in a project have the
# same CFBundleVersion and CFBundleShortVersionString values. This is because mismatched values
# can cause a warning when submitting to the App Store. Secondly, to ensure that the build number
# is incremented appropriately when git has changes.
#
H: (Horizontal) //horizontal direction
V: (Vertical) //vertical direction
| (pipe) //superview
- (dash) //standard spacing (generally 8 points)
[] (brackets) //name of the object (uilabel, unbutton, uiview, etc.)
() (parentheses) //size of the object
== equal widths //can be omitted
-16- non standard spacing (16 points)
<= less than or equal to
>= greater than or equal to
import Foundation
class AsyncOperation: Operation {
public enum State: String {
case ready, executing, finished
fileprivate var keyPath: String {
return "is" + rawValue.capitalized
}
}
import Foundation
enum AssociatedObject {
/// Wrapper for Associated Objects that allows us to use Swift value types.
internal final class Wrapper<T>: NSObject, NSCopying {
let value: T
init(_ value: T) {
self.value = value
}
// The MIT License (MIT)
//
// Copyright (c) 2015 Suyeol Jeon (xoul.kr)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions: