Skip to content

Instantly share code, notes, and snippets.

View danielrotaermel's full-sized avatar

Daniel Rotärmel danielrotaermel

View GitHub Profile
@synthetic-intelligence
synthetic-intelligence / More Helpful Commands
Last active April 25, 2024 14:28
Smart Card Config MacOS
# MacOS smartcard
List tokens available in the system
pluginkit -m -p com.apple.ctk-tokens
ex: com.apple.CryptoTokenKit.setoken(1.0)
com.apple.CryptoTokenKit.pivtoken(1.0)
@Zekfad
Zekfad / conventional-commits.md
Last active May 17, 2024 04:30
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@makoscafee
makoscafee / ContentView.swift
Created June 21, 2020 08:48 — forked from mshafer/ContentView.swift
Slide-over card (like in Maps or Stocks) using SwiftUI
import SwiftUI
struct ContentView : View {
var body: some View {
ZStack(alignment: Alignment.top) {
MapView()
SlideOverCard {
VStack {
CoverImage(imageName: "maitlandbay")
Text("Maitland Bay")
@Icaruk
Icaruk / multipleGitProfiles.md
Last active May 9, 2024 19:45
How to have multiple profiles on git

Last update: 30-01-2024
Last view: 30-01-2024

Step 1

Go to your work folder, mine is located at: F:/Work/EnterpriseName/

And then create a .gitconfig-work with the following data:

@jfuellert
jfuellert / ScrollableView.swift
Last active April 11, 2024 17:57
A scrollable SwiftUI view, UIScrollView wrapper. ScrollableView lets you read and write content offsets for scrollview in SwiftUI, with and without animations.
import SwiftUI
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable {
// MARK: - Coordinator
final class Coordinator: NSObject, UIScrollViewDelegate {
// MARK: - Properties
private let scrollView: UIScrollView
var offset: Binding<CGPoint>
@arastu
arastu / airpods-toggle.applescript
Last active March 29, 2021 08:47
Connect/disconnect AirPods automatically on Mac
-- Forked from: https://coderwall.com/p/fyfp0w/applescript-to-connect-bluetooth-headphones
activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell btMenu
click
tell (menu item "PUT_YOUR_AIRPODE_NAME_HERE" of menu 1) -- Touhid’s AirPods not Touhid's AirPods
click
if exists menu item "Connect" of menu 1 then
@jakeajames
jakeajames / patch.sh
Last active April 5, 2024 13:42
Make h3lix work when installed not-via-Impactor. To be used with the latest h3lix.
if [ $# != 2 ]; then
echo "Usage: $0 /path/to/input_ipa /path/to/output_ipa"
exit 1
fi
if ! [ -f $1 ]; then
echo "'$1' does not exist"
exit 1
fi
@mshafer
mshafer / ContentView.swift
Last active May 3, 2023 13:37
Slide-over card (like in Maps or Stocks) using SwiftUI
import SwiftUI
struct ContentView : View {
var body: some View {
ZStack(alignment: Alignment.top) {
MapView()
SlideOverCard {
VStack {
CoverImage(imageName: "maitlandbay")
Text("Maitland Bay")
@jaredmoody
jaredmoody / Connect Airpods.applescript
Last active December 9, 2021 13:11
An Applescript to connect bluetooth devices, such as Airpods. Nice when paired with an alfred trigger.
# Don't use this script, use this one instead:
# https://gist.github.com/ieatfood/814b065964492f71f728da59a47413bc
tell application "System Events"
tell process "ControlCenter"
set bt to (first menu bar item whose title is "Bluetooth") of menu bar 1
click bt
set btCheckbox to checkbox 1 of scroll area 1 of group 1 of window "Control Center" whose title contains "AirPods Pro"
set btCheckboxValue to value of btCheckbox
tell btCheckbox to click
@arlina-espinoza
arlina-espinoza / split_json.sh
Created May 24, 2017 21:29
Bash script to split a JSON into multiple files. Uses jq.
#!/bin/bash
# Split a JSON into multiple files. Uses jq.
# Usage
# ./split_json.sh /path/to/json/file
file="$1"
jq -cr 'keys[] as $k | "\($k)\t\(.[$k])"' "$file" | awk -F\\t '{ file=$1".json"; print $2 > file; close(file); }'