ATTENTION! This is just for testing purposes. The two files try different approaches to store endless data in the memory. This experiment shows how the computer behaves in edge cases.
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
struct ContentView: View { | |
@State private var presentAlert = false | |
@State private var username: String = "" | |
@State private var password: String = "" | |
var body: some View { | |
Button("Show Alert") { | |
presentAlert = true | |
} | |
.alert("Login", isPresented: $presentAlert, actions: { |
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/sh | |
## Thanks to https://gist.github.com/tscheckenbach/00f1ae57881b79254f11f1815debd9af | |
echo "Please login to your Apple Account through the Mac App Store" | |
echo "When logged in sucessfully press [ENTER} to continue" | |
read | |
############################################## | |
## Install homebrew and Xcode |
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
# Run & ./List-All-Secrets-Key-Vault.ps1 my-vault-name | |
param([string]$KeyVaultName) | |
$secrets = Get-AzureKeyVaultSecret -VaultName $KeyVaultName | |
$secrets.foreach{ Get-AzureKeyVaultSecret -VaultName $_.VaultName -Name $_.Name } | Select-Object Name,SecretValueText |
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
class HumanTimeInterval{ | |
// inspired by https://gist.github.com/skreutzberger/9122ac3683f3354a7e24 | |
static func relativeDateInterval(date: Date) -> String? { | |
let formatter = DateComponentsFormatter() | |
formatter.unitsStyle = .abbreviated | |
formatter.includesApproximationPhrase = false | |
formatter.includesTimeRemainingPhrase = false | |
formatter.allowedUnits = [.year, .month, .weekOfMonth, .day, .hour, .minute, .second] | |
formatter.maximumUnitCount = 2 | |
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
^.*\S+.*$ | |
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
#!/usr/bin/perl | |
# ^ wird verwendet wenn mehrere Perl installiert | |
use Math::Trig; # Mathe Library | |
# spitze klammern sind Handle | |
chomp($r = <STDIN>); # Zeile einlesen | |
# chomp Entfernt alle strings die noch aus der vorherigen eingeabe vorhanden sind | |
print 2 * pi * $r; | |
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
import UIKit | |
class MyObjects: NSObject{ | |
var myOptional: String? | |
var myRequired: String | |
init(req: String, op: String?) { | |
myOptional = op | |
myRequired = req | |
} | |
} |
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
# Simple code to give a file executable rights | |
chmod u+x file.sh |
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 | |
#Make Sure Script Is Ran As Root | |
if [ $(id -u) != 0 ]; then | |
echo; echo -e "\e[1;31mScript must be run as sudo. Please Type \"sudo\" To Run As Root \e[0m"; echo | |
exit 1 | |
fi | |
echo "Enter port to listen" | |
read portL |
NewerOlder