This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
UILocalNotification *localNotification = launchOptions[UIApplicationLaunchOptionsLocalNotificationKey]; | |
if (localNotification) { | |
// the user opened your app by tapping either the notification banner, the notification | |
// center entry or the open action in the alert view of the notification while your app | |
// was not running / suspended. | |
// This is where you want to react to the user's action! | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) | |
# | |
# This is complicated: | |
# | |
# SOMETIMES you need to put this file in version control. | |
# Apple designed it poorly - if you use "custom executables", they are | |
# saved in this file. | |
# 99% of projects do NOT use those, so they do NOT want to version control this file. | |
# ..but if you're in the 1%, comment out the line "*.pbxuser" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
sudo apt update -y | |
sudo apt install software-properties-common | |
sudo add-apt-repository ppa:ubuntu-elisp/ppa -y | |
sudo apt update && sudo apt install emacs25 | |
# emacs25.desktop: | |
cp /usr/share/applications/emacs25.desktop ~/.local/share/applications | |
# Replace the Exec line with: Exec=Exec=/usr/bin/env XLIB_SKIP_ARGB_VISUALS=1 emacsclient -a '' -n -c %F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct AnyCodable: Codable { | |
public let value: Any? | |
public init(_ value: Any?) { | |
self.value = value | |
} | |
public init(from decoder: Decoder) throws { | |
let container = try decoder.singleValueContainer() | |