Skip to content

Instantly share code, notes, and snippets.

View Geri-Borbas's full-sized avatar
💡

Geri Borbás Geri-Borbas

💡
View GitHub Profile
@Geri-Borbas
Geri-Borbas / change_name.sh
Created December 2, 2022 13:29
Change computer name (in macOS terminal).
sudo scutil --set HostName <COMPUTER_NAME>
sudo scutil --set LocalHostName <COMPUTER_NAME>
sudo scutil --set ComputerName <COMPUTER_NAME>
@Geri-Borbas
Geri-Borbas / commit_date.sh
Created December 2, 2022 13:28
Change latest commit date (and force push to remote).
git commit --amend --date="Wed Nov 30 14:55 2022 +0100" --no-edit
GIT_COMMITTER_DATE="Wed Nov 30 14:55 2022 +0100" git commit --amend --no-edit
git push origin main --force
import SwiftUI
struct SettingsView: View {
@State var isPortraitOnlyViewPresented = false
var body: some View {
List {
Section {
@Geri-Borbas
Geri-Borbas / NOTES.md
Last active May 17, 2022 02:00
Create UI in code template from storyboard templates.
  1. Remove Main.storyboard file from the bundle.
  2. Remove main from Target/General/Main Interface
  3. Remove Main from Info.plist at Application Scene Manifest/Scene Configuration/Application Session Role/Default Configuration.
  4. Instantiate window with first view controller in SceneDelegate.

Replace this method.

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
    // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
import SwiftUI
struct Marquee: View {
struct Metrics {
static let iconCount = CGFloat(10)
static let marqueeIconCount = CGFloat(3)
static let iconSize = CGFloat(95)
@Geri-Borbas
Geri-Borbas / wp-confing.php
Created March 16, 2022 18:06
Setup SSL for WordPress.
// Add this to `wp-confing.php`.
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = '443';
define('WP_HOME','https://blog.address.com');
define('WP_SITEURL','https://blog.address.com');
@Geri-Borbas
Geri-Borbas / FilterSelectionToVisibility.js
Created October 26, 2021 10:21
Filter selection keeping visible objects only in Figma!
figma.currentPage.selection =
figma.currentPage.selection
.filter(eachNode =>
eachNode.visible == true
)
@Geri-Borbas
Geri-Borbas / FilterSelectionToName.js
Last active October 26, 2021 10:20
Filter selection to object name in Figma.
figma.currentPage.selection = figma.currentPage.selection
.filter(eachNode =>
eachNode.name.includes("Text")
)
@Geri-Borbas
Geri-Borbas / CGFloat+Easing.swift
Last active January 11, 2021 20:40
Simplified/normalized CGFloat easing algorithms. See https://github.com/Geri-Borbas/Unity.Library.eppz_easing for more.
extension CGFloat {
var linear: CGFloat {
self
}
var easeIn_1: CGFloat {
pow(self, 2)
}
@Geri-Borbas
Geri-Borbas / IDETemplateMacros.plist
Last active September 11, 2020 10:37
Xcode file header template. Put this into <WORKSPACE_NAME>.xcworkspace/xcuserdata/<USER_NAME>.xcuserdatad/IDETemplateMacros.plist. Set date format in System Settings / Language & Region / Dates, then edit "Short" format.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>
// ___FILENAME___
// <PROJECT_NAME>
//
// Created by ___FULLUSERNAME___ on ___DATE___.