Skip to content

Instantly share code, notes, and snippets.

View fotiDim's full-sized avatar

Foti Dim fotiDim

View GitHub Profile
@jonathan-beebe
jonathan-beebe / clean_old_code_simulators.sh
Last active February 12, 2019 19:40
Clean out unused Xcode Simulators
# Close Xcode & the iOS Simulator
# http://stackoverflow.com/a/30940055
# Remove any old runtimes from this directory.
cd /Library/Developer/CoreSimulator/Profiles/Runtimes
# e.g.
sudo rm -rf iOS\ 8.1.simruntime
# http://stackoverflow.com/a/11790983
# Remove the download receipts for simulators you don't need anymore.
@evgenyneu
evgenyneu / AutoCancellingTimer.swift
Last active September 24, 2016 03:08
Auto-cancelling Swift timer.
//
// Creates a timer that executes code after delay. The timer lives in an instance of `AutoCancellingTimer` class and is automatically canceled when this instance is deallocated.
// This is an auto-canceling alternative to timer created with `dispatch_after` function.
//
// Source: https://gist.github.com/evgenyneu/516f7dcdb5f2f73d7923
//
// Usage
// -----
//
// class MyClass {
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active April 5, 2025 04:55
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@kevinrenskers
kevinrenskers / createbuild.sh
Last active May 6, 2016 12:39
iOS build script
#!/bin/bash
ARCHIVE_DEST_PATH="./archive"
ARCHIVE_PACKAGE="$ARCHIVE_DEST_PATH.xcarchive"
# Remove old archive
if [ -f "$ARCHIVE_PACKAGE/Info.plist" ]; then
rm -r "$ARCHIVE_PACKAGE"
fi
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active April 20, 2025 21:15
The best FRP iOS resources.

Videos

@kany
kany / sendmail_setup.md
Last active January 27, 2025 11:55
Setup SENDMAIL on Mac OSX Yosemite
@mchirico
mchirico / cal.swift
Created September 6, 2014 12:36
Example of creating and removing calendar entries in Swift. Also, shows how to list reminders
/*
You need to import EventKit
import EventKit
*/
@IBAction func buttonCalendar(sender: AnyObject) {
var eventStore : EKEventStore = EKEventStore()
// 'EKEntityTypeReminder' or 'EKEntityTypeEvent'
@sawapi
sawapi / AppDelegate.swift
Last active October 25, 2023 09:26
[Swift] Push Notification
//
// AppDelegate.swift
// pushtest
//
// Created by sawapi on 2014/06/08.
// Copyright (c) 2014年 sawapi. All rights reserved.
//
// iOS8用
import UIKit
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 7, 2025 05:43
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@kukat
kukat / UINavigationBarTitle+Icon.m
Last active March 31, 2021 15:42
UINavigationBar Title with Image
// Icon
UIImage *headerIcon = [UIImage imageNamed:@"store32"];
NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init];
textAttachment.image = headerIcon;
NSAttributedString *icon = [NSAttributedString attributedStringWithAttachment:textAttachment];
// space between icon and title
NSAttributedString *space = [[NSAttributedString alloc] initWithString:@" "];
// Title