Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
🍏🦕

Dariusz Rybicki darrarski

:octocat:
🍏🦕
View GitHub Profile
@lukeredpath
lukeredpath / LICENSE
Last active Apr 7, 2021
Unwrapping embedded case values in TCA test store tests
View LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
View Podcasts.swift
import SwiftUI
import PlaygroundSupport
struct showArt: View {
@Binding var isPlaying: Bool
var body: some View {
VStack {
VStack {
RoundedRectangle(cornerRadius: 16)
.shadow(color: Color(UIColor.black.withAlphaComponent( isPlaying ? 0.3 : 0.1)), radius: 20, x: 0, y: 10)
@JunyuKuang
JunyuKuang / UIResponder+performWindowDrag.swift
Last active Jul 20, 2022
Customize/extend the window draggable area of your Mac Catalyst app.
View UIResponder+performWindowDrag.swift
//
// UIResponder+performWindowDrag.swift
// JonnyUtility
//
// Created by Jonny Kuang on 10/7/19.
// Copyright © 2019 Junyu Kuang <lightscreen.app@gmail.com>. All rights reserved.
//
import UIKit
View alignment-guides-tool.swift
// The SwiftUI Lab
// Website: https://swiftui-lab.com
// Article: https://swiftui-lab.com/alignment-guides
import SwiftUI
class Model: ObservableObject {
@Published var minimumContainer = true
@Published var extendedTouchBar = false
@Published var twoPhases = true
@steventroughtonsmith
steventroughtonsmith / UIView+Tooltips.h
Last active May 6, 2021
WIP tooltips for Mac Catalyst
View UIView+Tooltips.h
//
// UIView+Tooltips.h
// Crossword
//
// Created by Steven Troughton-Smith on 13/09/2019.
// Copyright © 2019 Steven Troughton-Smith. All rights reserved.
//
#import <UIKit/UIKit.h>
View collectionview.swift
//
// ContentView.swift
// DeleteMe
//
// Created by Chris Eidhof on 02.02.21.
//
import SwiftUI
/*
View swiftui.swift
import Combine
import CoreFoundation
import CoreGraphics
import CoreText
import Darwin
import Foundation
import SwiftUI
import UIKit
import os.log
import os
@olegam
olegam / find_closest_scooter.js
Created Feb 9, 2019
Scriptable app script to find closest scooter in Copenhagen
View find_closest_scooter.js
let googleApiKey = '' // Insert your own key for Google Maps + Directions JS SDK here
let copenhagenBounds = {minLat: 55.5, minLong: 12.5, maxLat: 55.8, maxLong: 12.7}
let copenhagenCenter = {lat: copenhagenBounds.maxLat - copenhagenBounds.minLat, lng: copenhagenBounds.maxLong - copenhagenBounds.minLong}
let getLocation = Location.current()
// const getLocation = new Promise(resolve => resolve({latitude: 55.7, longitude: 12.5})) // hardcoded location resolver for airplane debug use
const [allTIERScooters, allVOIScooters, myLocation] = await Promise.all([getTIERScooters(copenhagenBounds), getVOIScooters(copenhagenBounds), getLocation])
console.log('My location: ' + JSON.stringify(myLocation))
if (allTIERScooters.length + allVOIScooters.length <= 0) {
@douglashill
douglashill / KeyboardTableView.swift
Last active Aug 29, 2022
A UITableView that allows navigation and selection using a hardware keyboard.
View KeyboardTableView.swift
// Douglas Hill, December 2018
// Made for https://douglashill.co/reading-app/
// Find the latest version of this file at https://github.com/douglashill/KeyboardKit
import UIKit
/// A table view that allows navigation and selection using a hardware keyboard.
/// Only supports a single section.
class KeyboardTableView: UITableView {
// These properties may be set or overridden to provide discoverability titles for key commands.
@mluisbrown
mluisbrown / FixBTSound.applescript
Last active Jun 14, 2022
AppleScript to set macOS audio input device to "Internal Microphone"
View FixBTSound.applescript
-- Sets your audio input source to "Internal Microphone"
-- Frequently needed if you use bluetooth headpohones and
-- run the Xcode iOS simulator, which will often set your
-- headphones to be the input device, resulting in a drastic
-- decrease in sound quality, and making it mono
tell application "System Preferences" to activate
tell application "System Preferences"
reveal anchor "input" of pane id "com.apple.preference.sound"
end tell