Bash script to:
- Iterate all commits made within a Git repository.
- List every object at each commit.
uuid () { | |
local newuuid=${$(uuidgen):l} | |
echo -n ${newuuid} | pbcopy | |
echo "copied ${newuuid} to clipboard" | |
} |
{ | |
"extends": ["prettier", "plugin:prettier/recommended"], | |
"plugins": ["prettier", "import"], | |
"rules": { | |
"import/order": [ | |
"error", | |
{ | |
"groups": ["builtin", "external", "parent", "sibling", "index"], | |
"pathGroups": [ | |
{ |
#!/bin/bash | |
find . -type f -size +100000k -exec ls -lh {} \; |
[ | |
{ | |
"key": "ctrl+shift+u", | |
"command": "editor.action.transformToUppercase", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "ctrl+shift+l", | |
"command": "editor.action.transformToLowercase", | |
"when": "editorTextFocus" |
import SwiftUI | |
import UIKit | |
struct BlurView: UIViewRepresentable { | |
var style: UIBlurEffect.Style = .systemMaterial | |
func makeUIView(context: Context) -> UIVisualEffectView { | |
return UIVisualEffectView(effect: UIBlurEffect(style: style)) | |
} |
import SwiftUI | |
import UIKit | |
extension View { | |
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View { | |
clipShape(RoundedCorner(radius: radius, corners: corners)) | |
} | |
} | |
private struct RoundedCorner: Shape { |
#!/bin/sh | |
# | |
# pull-all-repos.sh | |
set -euo pipefail | |
for d in */; do cd $d; git stash; (git pull &); cd ..; done |
let keyWindow = UIApplication.shared.connectedScenes | |
.filter { $0.activationState == .foregroundActive } | |
.map { $0 as? UIWindowScene } | |
.compactMap { $0 } | |
.first?.windows | |
.filter { $0.isKeyWindow } | |
.first | |
// Usage e.g. | |
_ = keyWindow?.safeAreaInsets.bottom ?? 0 |
#!/usr/bin/env bash | |
# | |
# lint-devices-file | |
# Usage example: ./scripts/ios/lint-devices-file fastlane/devices.txt | |
FILE=$1 | |
TAB_COUNT=$(grep "$(printf '\t')" $FILE | wc -l) | |
NEW_LINE_COUNT=$(grep "$(printf '\n')" $FILE | wc -l) |