Skip to content

Instantly share code, notes, and snippets.

View rursache's full-sized avatar
💻

Radu Ursache rursache

💻
View GitHub Profile
@brzzdev
brzzdev / iOSmacOSFonts.md
Last active November 6, 2023 02:28
iOS/macOS Font Sizes/Font Styles

What the built-in font styles correspond to on iOS and macOS:

Style iOS Default macOS macOS Emphasized
.largeTitle Regular 34 Regular 26 Bold
.title Regular 28 Regular 22 Bold
.title2 Regular 22 Regular 17 Bold
.title3 Regular 20 Regular 15 Semibold
.headline Semibold 17 Bold 13 Heavy
.body Regular 17 Regular 13 Semibold
@phranck
phranck / PlatformVisibility.swift
Last active November 13, 2022 22:40
A Swift view modifier to handle visibility of views for specific platforms
import SwiftUI
public struct Platform: OptionSet {
public var rawValue: UInt8
public static let iOS = Platform(rawValue: 1 << 0)
public static let macOS = Platform(rawValue: 1 << 1)
public static let tvOS = Platform(rawValue: 1 << 2)
public static let watchOS = Platform(rawValue: 1 << 3)
public static let all: Platform = [.iOS, .macOS, .tvOS, .watchOS]
@R0GERIUS
R0GERIUS / build_qbt_dmg.sh
Last active March 14, 2022 17:12 — forked from Kolcha/build_qbt_dmg.sh
script to build qBittorrent master branch on macOS, no Homebrew required!
#!/bin/zsh
# standalone script to build qBittorent for macOS (including Apple Silicon based Macs)
#
# only Xcode must be installed (Xcode 12 is required to produce arm64 binaries)
# all required dependencies and tools are automatically downloaded and used only from script's working directory
# (can be specified), nothing is installed into the system
# working directory is removed on completion if it was not specified
#
# by default script produces binaries for the architecture it was launched on, but cross-compilation is also supported
# in both directions, i.e. x86_64 -> arm64 and arm64 -> x86_64
@robhaswell
robhaswell / Dockerfile
Last active August 11, 2023 22:15
mdadm notifications to Slack
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install -y mdadm python3-minimal ca-certificates
RUN mkdir /app
WORKDIR /app
ADD notify.py .
@mrpeardotnet
mrpeardotnet / PVE-postinstall-5x.md
Last active March 20, 2024 10:43
PVE-postinstall-6.x

Proxmox PVE 6.x Post Installation Steps

This cheatsheet helps to set up your Proxmox Virtual Environment (PVE) host after fresh installation. Designed and tested on PVE version 6.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.

How to edit config files

The simplest way to edit config file is to use vim.tiny editor, for example to edit vzdump.conf file use this command:

@MattSHallatt
MattSHallatt / DateComponentsFormatter.playground
Created November 30, 2017 15:06
DateComponentsFormatter Playground
import UIKit
/*:
DateComponentsFormatter: A formatter that creates string representations of quantities of time.
*/
let dateComponentsFormatter = DateComponentsFormatter()
/*:
A DateComponentsFormatter can be configured with an array of NSCalendarUnits. These components are then used in the output.