Posts tagged “tech”

20211215T115458

15 December 2021

TIL you can detect whether the targetEnvironment is iPadOS in SwiftUI with the following code:


extension UIDevice {
static var isIPad: Bool {
UIDevice.current.userInterfaceIdiom == .pad
}
static var isIPhone: Bool {
UIDevice.current.userInterfaceIdiom == .phone
}
}

Here’s the Stack Overflow comment I got this code from.




20211215T100733

15 December 2021

TIL you can find a file recursively in Linux with the following command:


find . -name "*foo"

Here’s the Stack Overflow comment I got this from.




20211206T205658

6 December 2021

TIL you can have syntax highlighting with code blocks in JIRA.

Here’s an example inspired from the docs:

{code:java}
// Some comments here
public String getFoo()
{
    return foo;
}
{code}



20211129T212900

29 November 2021

TIL you can switch back to the previous branch by running git switch -.




20211129T185500

29 November 2021

TIL you can navigate to the previous directory with cd -.




20211116T181500

16 November 2021

TIL that there’s a free, open source, private, iOS fitness app called OutRun (App Store).




20211116T181000

16 November 2021

TIL you can get music recognition (Shazam) in your Control Center.




20211113T141455

13 November 2021

TIL you can get Vim keybindings in XCode 13.

Menu Bar -> Editor -> Vim Mode




20211105T230006

5 November 2021

TIL you can create an iOS shortcut to turn Bluetooth off completely.

Or you can download mine.




20211105T204230

5 November 2021

TIL you can create an iOS shortcut to turn Wifi completely off.

Or you can download mine.