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
name: Deploy Website | |
on: | |
push: | |
branches: | |
- main | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
# 📜 https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
permissions: |
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
import { ComponentProps, ReactNode } from 'react'; | |
import { Store } from 'common/store/test-utils/factories'; | |
import expectRenderError from 'test-utils/expectRenderError'; | |
import { fireEvent, renderWithHoc } from 'test-utils/helpers'; | |
import XXX from '..'; | |
type RenderComponentProps = { | |
props: Partial<ComponentProps<typeof XXX>>; |
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
["CTFeatureTypeIdentifier": 0, "CTFeatureTypeName": All Typographic Features, "CTFeatureTypeSelectors": <__NSArrayM 0x600003b95bf0>( | |
{ | |
CTFeatureSelectorDefault = 1; | |
CTFeatureSelectorIdentifier = 0; | |
CTFeatureSelectorName = On; | |
} | |
) | |
] | |
["CTFeatureTypeIdentifier": 1, "CTFeatureTypeName": Ligatures, "CTFeatureTypeSelectors": <__NSArrayM 0x600003b95680>( | |
{ |
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
brew "swiftlint" | |
brew "swiftformat" |
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
#!/usr/bin/perl | |
# This filter changes all words to Title Caps, and attempts to be clever | |
# about *un*capitalizing small words like a/an/the in the input. | |
# | |
# The list of "small words" which are not capped comes from | |
# the New York Times Manual of Style, plus 'vs' and 'v'. | |
# | |
# 10 May 2008 | |
# Original version by John Gruber: |
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
// | |
// main.swift | |
// Maths2 | |
// | |
// Created by Mickaël Floc'hlay on 23/02/2020. | |
// Copyright © 2020 mickf.net. All rights reserved. | |
// | |
import Foundation |
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
let url1 = try! FileManager.default.url(for: .documentDirectory, | |
in: .userDomainMask, | |
appropriateFor: nil, | |
create: false) | |
.appendingPathComponent("1234") | |
let url2 = URL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]) | |
.appendingPathComponent("1234") | |
debugPrint("Same URL? \(url1 == url2)") |
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
class FooCell: UICollectionViewCell { | |
private var sizingOnlyWidthConstraint: NSLayoutConstraint? = nil | |
func sizeWith(width: CGFloat, myString: String) -> CGSize { | |
if sizingOnlyWidthConstraint == nil { | |
sizingOnlyWidthConstraint = NSLayoutConstraint(item: self, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: width) | |
sizingOnlyWidthConstraint?.isActive = true | |
} | |
if sizingOnlyWidthConstraint!.constant != width { |
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
func iterateKeychainItems(log: Bool, delete: Bool) { | |
let secItemClasses = [ | |
kSecClassGenericPassword, | |
kSecClassInternetPassword, | |
kSecClassCertificate, | |
kSecClassKey, | |
kSecClassIdentity | |
] | |
if (log) { |
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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
gem 'cocoapods' | |
gem 'fastlane' | |
gem 'jazzy' |
NewerOlder