Skip to content

Instantly share code, notes, and snippets.

View speedoholic's full-sized avatar
👨‍💻
Exploring SwiftUI

Kushal Ashok speedoholic

👨‍💻
Exploring SwiftUI
View GitHub Profile
@floriankrueger
floriankrueger / Reachability+NetworkType.swift
Created April 30, 2018 10:25
Getting the current network connection type through Reachability and CoreTelephony (based on https://stackoverflow.com/a/36451194/766873)
import Reachability
import CoreTelephony
enum NetworkType {
case unknown
case noConnection
case wifi
case wwan2g
case wwan3g
case wwan4g
@joemasilotti
joemasilotti / ..md
Last active September 13, 2022 14:20
Resetting NSUserDefaults in UI Testing

Resetting NSUserDefaults in UI Testing

  1. Add "UI-Testing" to launchArguments before launching the app under test
  2. On launch, check for the argument in AppDelegate.swift
  3. If it exists remove everything for the app's domain from NSUserDefaults
@DavidNix
DavidNix / logNSNotifications.m
Last active December 30, 2022 10:58
Log all NSNotifications as they are fired
static void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo);
void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active July 19, 2024 01:24
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@rxaviers
rxaviers / gist:7360908
Last active July 23, 2024 17:36
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@psobko
psobko / UIScrollView Detect Bounce Direction
Created August 28, 2013 16:17
Detect which direction a UIScrollView is bouncing
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
float scrollOffsetY = scrollView.contentOffset.y;
if(scrollOffsetY < 0)
{
//Pulling down
}
else if(scrollOffsetY > scrollView.contentSize.height - scrollView.frame.size.height)
{