This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BackupFileTests.swift | |
// BackupFileTests | |
// | |
// Created by Rudolf Farkas on 21.05.22. | |
// | |
@testable import BackupFile | |
import XCTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
/usr/local/bin/code `pwd` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BackupFile.swift | |
// BackupFile | |
// | |
// Created by Rudolf Farkas on 21.05.22. | |
// | |
import Foundation | |
// a wrapper struct that backs up the wrapped struct in an iOS file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test Suite 'All tests' started at 2022-05-22 15:28:43.735 | |
Test Suite 'BackupFileTests.xctest' started at 2022-05-22 15:28:43.737 | |
Test Suite 'BackupFileTests' started at 2022-05-22 15:28:43.737 | |
Test Case '-[BackupFileTests.BackupFileTests test_BackupFile]' started. | |
Test Case '-[BackupFileTests.BackupFileTests test_BackupFile]' passed (0.005 seconds). | |
Test Suite 'BackupFileTests' passed at 2022-05-22 15:28:43.743. | |
Executed 1 test, with 0 failures (0 unexpected) in 0.005 (0.006) seconds | |
Test Suite 'BackupFileTests.xctest' passed at 2022-05-22 15:28:43.744. | |
Executed 1 test, with 0 failures (0 unexpected) in 0.005 (0.007) seconds | |
Test Suite 'All tests' passed at 2022-05-22 15:28:43.744. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. in preload, the contextBridge exposes a copy of a process variable for info | |
// 2. the renderer inserts the info into the view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. the renderer attaches a listener to the button defined in the html file | |
// . on user click, the listener calls the function setTitle passing on the value from the input element | |
// 2. the preload defines the function that will be called by setTitle and pass on the title sending the event set-title | |
// 3. the main attaches a listener for the event set-title | |
// that will get the title an put it into the browser window title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Renderer defines a listener that will, on the user click, | |
// call asynchronously window.electronAPI.openFile(), | |
// which is defined by preload. | |
// Function openFile returns the data | |
// (the file path selected by the user) that the handler in main | |
// obtained from the OS dialog. | |
// The listener updates the html text with this data. | |
// 2. Preload defines function openFile that calls invoke(<channel>) | |
// which will be handled by the main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Main prepares a Menu that will let the user | |
// increment/decrement a counter, whose valu will be displayed | |
// in the rendered page | |
// On user click, the callback will send a message | |
// on the channel (update-counter) with the value to add | |
// 2. Preload defines the function handleCounter | |
// that will let the renderer to specify the callback | |
// to be called when a message on the channel (pdate-counter) | |
// arrives from the main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a new Go project with a main.go file and a Go module | |
# Option -c, --cobra: Initialize a Cobra CLI project in the module | |
while getopts ":c" opt; do | |
case $opt in | |
c) | |
c_flag=true | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|