Skip to content

Instantly share code, notes, and snippets.

@camyoh
camyoh / getIP.swift
Last active November 14, 2025 09:54
Get the IP on iphone, swift 5
//
// GetIPAddress.swift
//
// Created by @camyoh
//
// MIT License
//
// Copyright (c) 2025 @camyoh
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
/**
Goal: have a properly localized date (month/day in the correct order), yet
have a custom date component separator.
Example as follows:
*/
NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
NSLocale *gbLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_GB"];
NSLocale *deLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"de_DE"];