Skip to content

Instantly share code, notes, and snippets.

View bojan's full-sized avatar

Bojan Dimovski bojan

View GitHub Profile
@kyleturner
kyleturner / Remove Submodule
Created January 5, 2012 01:07
How to remove a submodule from a Github project
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
@niw
niw / show_ipa_metadata.sh
Last active January 16, 2020 11:33
Extract iTunesMetadata.plist from ipa file, read it and dump it.
#!/usr/bin/env bash
TEMP_PLIST=/tmp/metadata.plist
for i in "$@"; do
if unzip -p "$i" iTunesMetadata.plist >"$TEMP_PLIST"; then
name=$(/usr/libexec/PlistBuddy -c 'Print :itemName' "$TEMP_PLIST")
id=$(/usr/libexec/PlistBuddy -c 'Print :itemId' "$TEMP_PLIST")
appleid=$(/usr/libexec/PlistBuddy -c 'Print :appleId' "$TEMP_PLIST" 2>/dev/null ||
/usr/libexec/PlistBuddy -c 'Print :com.apple.iTunesStore.downloadInfo:accountInfo:AppleID' "$TEMP_PLIST" 2>/dev/null ||
@bojan
bojan / .gitignore
Last active August 8, 2022 07:43
Git ignore file for development on Apple platforms. Covers Xcode, AppCode, SPM, Carthage, CocoaPods, Fastlane, etc.
# --------------------------------
# macOS temporary files
# --------------------------------
.DS_Store
*.lock
*.swp
# --------------------------------
# Xcode
# --------------------------------
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active June 17, 2024 06:08
The best FRP iOS resources.

Videos

@kristopherjohnson
kristopherjohnson / DispatchGroupDemo.swift
Last active May 28, 2021 14:40
Simple demo of dispatch_group_async/dispatch_group_notify/dispatch_group_wait in Swift
import Foundation
let notified = dispatch_semaphore_create(0)
let group = dispatch_group_create()
let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
for n in 0..<20 {
dispatch_group_async(group, queue) {
let timeInterval = Double(arc4random_uniform(1000)) * 0.01
@purp
purp / rbenv-copy-gems.rb
Created July 7, 2016 16:01
rbenv: install all gems from one version to another
#!/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"