Skip to content

Instantly share code, notes, and snippets.

import UIKit
class ViewController: UIViewController {
private(set) var bottomBarLayoutGuide = UILayoutGuide()
private var redBox: UIView!
override func viewDidLoad() {
super.viewDidLoad()
diff --git a/WordPress/Classes/Utility/Editor/EditorFactory.swift b/WordPress/Classes/Utility/Editor/EditorFactory.swift
index 095608ca3b..dacfa50ec5 100644
--- a/WordPress/Classes/Utility/Editor/EditorFactory.swift
+++ b/WordPress/Classes/Utility/Editor/EditorFactory.swift
@@ -14,6 +14,7 @@ class EditorFactory {
func instantiateEditor(for post: AbstractPost, loadAutosaveRevision: Bool = false, appliedTemplate: String? = nil, replaceEditor: @escaping ReplaceEditorBlock) -> EditorViewController {
if gutenbergSettings.mustUseGutenberg(for: post) {
+ let gutenberg = createGutenbergVC(with: post, loadAutosaveRevision: loadAutosaveRevision, appliedTemplate: appliedTemplate, replaceEditor: replaceEditor)
return createGutenbergVC(with: post, loadAutosaveRevision: loadAutosaveRevision, appliedTemplate: appliedTemplate, replaceEditor: replaceEditor)
import Foundation
protocol Delegate: class {
}
@objc class Thing: NSObject {
weak var delegate: Delegate?
init(delegate: Delegate) {
self.delegate = delegate
@bjtitus
bjtitus / package-lock.json
Created October 23, 2020 21:02
Gridicons Package-lock
{
"name": "gridicons",
"version": "3.3.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"abab": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz",
"integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=",
@bjtitus
bjtitus / AppStoreGuidelines-2020-09-03.txt
Created September 11, 2020 18:00
App Store September Changes
1. Safety
When people install an app from the App Store, they want to feel confident that it’s safe to do so—that the app doesn’t contain upsetting or offensive content, won’t damage their device, and isn’t likely to cause physical harm from its use. We’ve outlined the major pitfalls below, but if you’re looking to shock and offend people, the App Store isn’t the right place for your app.
1.1 Objectionable Content
Apps should not include content that is offensive, insensitive, upsetting, intended to disgust, in exceptionally poor taste, or just plain creepy. Examples of such content include:
1.1.1 Defamatory, discriminatory, or mean-spirited content, including references or commentary about religion, race, sexual orientation, gender, national/ethnic origin, or other targeted groups, particularly if the app is likely to humiliate, intimidate, or harm a targeted individual or group. Professional political satirists and humorists are generally exempt from this requirement.
1.1.2 Realistic portrayals of people or
@bjtitus
bjtitus / gh-issues.fish
Last active August 26, 2020 03:17
GH Tools
# Lists Github issues assigned to you
function gh-issues --description 'Interactively selects Issues'
gh issue view (gh issue list -a 'bjtitus' | sed '/^.*✓/ d' | sed '/^$/d' | fzf --tac --color=16 | grep -oE "\d+" | head -1)
end
@bjtitus
bjtitus / gh-pr
Last active February 14, 2020 21:33
Open current branch in Github
# For Bash or ZSH
function gh-pr() {
branch=`git rev-parse --abbrev-ref HEAD`
prNum=`gh pr list | grep '$branch' | grep -o '[0-9]\+' | head -1`
gh pr view $prNum
}
@bjtitus
bjtitus / Crash.log
Created November 2, 2015 15:58
Swift Profile Coverage Mapping Ternary Compiler Crashes
0 swift 0x0000000105bbc33b llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x0000000105bbca7b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff8b24052a _sigtramp + 26
3 libc++.1.dylib 0x00007fff8f4d93c6 std::__1::num_put<char, std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > >::do_put(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::ios_base&, char, unsigned long) const + 0
4 swift 0x00000001042f05da swift::Expr::walk(swift::ASTWalker&) + 26
5 swift 0x0000000103ec7951 walkForProfiling(swift::AbstractFunctionDecl*, swift::ASTWalker&) + 225
6 swift 0x0000000103ec732d swift::Lowering::SILGenProfiling::assignRegionCounters(swift::AbstractFunctionDecl*) + 573
7 swift 0x0000000103ed265d (anonymous namespace)::SILGenType::emitType() + 701
8 swift 0x0000000103ed232e swift::Lowering::SILGenModule::visitNominal
### Keybase proof
I hereby claim:
* I am bjtitus on github.
* I am bjtitus (https://keybase.io/bjtitus) on keybase.
* I have a public key whose fingerprint is A5F4 94EA 5211 28E6 1869 6A1D 7173 093D CF0A B813
To claim this, I am signing this object:
@bjtitus
bjtitus / backup-github.sh
Last active May 18, 2022 09:14 — forked from rodw/backup-github.sh
A shell script to backup your Github organization's repos.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments)
# I recommend using an API token so it is easily trackable and removable.
# Note that you MUST have SSH keys for a user with the access to all repos set up