LinkedIn is even more clickbait than Facebook nowadays. Adios. 💣
Visit https://www.linkedin.com/feed/following/
Scroll down to load all of your contacts
Open developer console, run the following
// | |
// StandByMargins.swift | |
// | |
// Created by Kyle Bashour on 8/29/23. | |
// | |
import SwiftUI | |
extension View { | |
func standByMargins() -> some View { |
# 1. Create 'ci_scripts' folder in your main project directory | |
# 2. Create 'ci_post_xcodebuild.sh' inside of it | |
# 3. Make it an executable by running 'chmod +x $ci_post_xcodebuild.sh' | |
set -e # fails build if any command fails | |
if [ ${CI_XCODEBUILD_EXIT_CODE} != 0 ] | |
then | |
exit 1 | |
fi |
let json = """ | |
{ | |
"foo": "bar", | |
"baz": null | |
} | |
""" | |
struct Type: Decodable { | |
let type: String | |
let value: String? |
LinkedIn is even more clickbait than Facebook nowadays. Adios. 💣
Visit https://www.linkedin.com/feed/following/
Scroll down to load all of your contacts
Open developer console, run the following
// based on this answer 'http://stackoverflow.com/a/36016798' | |
class LeftAlignedCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? { | |
let attributes = super.layoutAttributesForElements(in: rect) | |
var leftMargin = sectionInset.left | |
var maxY: CGFloat = -1.0 | |
attributes?.forEach { layoutAttribute in | |
if layoutAttribute.frame.origin.y >= maxY { |
extension Array { | |
var powerSet: [[Element]] { | |
guard !isEmpty else { return [[]] } | |
return Array(self[1...]).powerSet.flatMap { [$0, [self[0]] + $0] } | |
} | |
} | |
print([1,2,3,4].powerSet) // -> [[], [1], [2], [1, 2], [3], [1, 3], [2, 3], [1, 2, 3], [4], [1, 4], [2, 4], [1, 2, 4], [3, 4], [1, 3, 4], [2, 3, 4], [1, 2, 3, 4]] |
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html