Skip to content

Instantly share code, notes, and snippets.

Avatar

Bojan Dimovski bojan

  • Ljubljana, Slovenia
View GitHub Profile
@bojan
bojan / NibBackedView.swift
Last active Apr 10, 2020
A utility protocol for auto-magically loading of nib backed views. Also, contains methods for `UITableViewCell`, `UICollectionViewCell`.
View NibBackedView.swift
//
// NibBackedView.swift
//
//
// Created by Bojan Dimovski on 14/01/2020.
//
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
// Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
@bojan
bojan / rbenv-copy-gems.rb
Created Mar 20, 2019 — forked from purp/rbenv-copy-gems.rb
rbenv: install all gems from one version to another
View rbenv-copy-gems.rb
#!/bin/bash
# copy is a misnomer; it's actually LIST + INSTALL
# --from 2.2.1 [--to other-version-else-whatever-is-currently-set]
#
# TODO: install only most-recent version that's installed in FROM
# TODO: use gem names only from FROM, install latest available version (might be more recent than in FROM)
# TODO: pass arguments to gem command (e.g. --no-document)
CURRENT_VERSION=`rbenv version | cut -d' ' -f1`
GEM_LIST_ARGS="--local"
@bojan
bojan / ios-device-support.sh
Last active Jul 24, 2018 — forked from steipete/ios-xcode-device-support.sh
Using iOS 11 devices with Xcode 8.3
View ios-device-support.sh
// The trick is to link the DeviceSupport folder from the beta to the stable version.
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5361a\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
@bojan
bojan / Xcode .gitignore
Last active Feb 28, 2021
Git ignore list for Xcode development related files
View Xcode .gitignore
# --------------------------------
# macOS temporary files
# --------------------------------
.DS_Store
*.lock
*.swp
# --------------------------------
# Xcode
# --------------------------------