I hereby claim:
- I am icanswiftabit on github.
- I am icanswiftabit (https://keybase.io/icanswiftabit) on keybase.
- I have a public key whose fingerprint is D285 B3E6 F43E 6EEC EC1F DADA BC8B 7AFB A8DC 5F32
To claim this, I am signing this object:
import SwiftUI | |
struct ContentState { | |
var count: Int | |
} | |
enum ContentInput { | |
case increment | |
case push | |
} |
--allman false | |
--assetliterals visual-width | |
--beforemarks | |
--binarygrouping 4,8 | |
--categorymark "MARK: %c" | |
--classthreshold 0 | |
--closingparen balanced | |
--commas always | |
--conflictmarkers reject | |
--decimalgrouping 3,6 |
#!/bin/bash | |
# Place this file in `.git/hooks/` | |
if which swiftlint >/dev/null; then | |
swiftlint autocorrect | |
else | |
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" | |
fi | |
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do |
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
[0] = LAYOUT( /* Base */ | |
KC_MUTE, KC_MPLY, | |
KC_LSHIFT, KC_7, KC_8, KC_9, | |
KC_LCTRL, KC_4, KC_5, KC_6, | |
KC_LALT, KC_1, KC_2, KC_3, | |
KC_LGUI, TG(1), KC_0, KC_DOLLAR | |
), | |
[1] = LAYOUT( /* Meeting Controls */ | |
_______, _______, |
{ | |
"title": "Change left_control + i/j/k/l to arrow keys", | |
"rules": [ | |
{ | |
"description": "Change left_control + i/j/k/l to arrow keys", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "i", |
{ | |
"title": "Arrow Key Pad", | |
"rules": [ | |
{ | |
"description": "Arrow Keypad Mode [Capslock as trigger key]", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock" |
I hereby claim:
To claim this, I am signing this object:
import UIKit | |
import MobileCoreServices | |
enum CatError: Error { | |
case invalidTypeIdentifier | |
} | |
protocol Shareable where Self: NSObject { | |
static var shareIdentifier: String { get } | |
} |
for item in coordinator.items { | |
let placeholder = UICollectionViewDropPlaceholder(insertionIndexPath: destinationIndexPath, reuseIdentifier: PlaceholderCollectionCell.identifier) | |
let placeholderContext = coordinator.drop(item.dragItem, to: placeholder) | |
item.dragItem.itemProvider.loadObject(ofClass: Cat.self) { cat, error in | |
DispatchQueue.main.async { | |
placeholderContext.commitInsertion { insertionIndexPath in | |
self.viewModel.cats.insert(cat as! Cat, at: insertionIndexPath.row) | |
} | |
} | |
} |
coordinator.session.loadObjects(ofClass: Cat.self) { cats in | |
DispatchQueue.main.async { | |
if coordinator.session.localDragSession != nil, let previousIndex = self.viewModel.cats.index(where: { $0.name == cat.name }) { | |
//Local drag session | |
self.viewModel.cats.swapAt(previousIndex, destinationIndexPath.row) | |
} else { | |
// External drag session | |
self.viewModel.cats.insert(cat, at: destinationIndexPath.row) | |
} | |
collectionView.reloadSections(destinationIndexPath.section) |