Using the Command Palette (CMD + SHIFT + P), open the option Preferences: Open User Settings (JSON):
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.addMissingImports": true
},TypeScriptMeine Gedankenstütze ;-)
Using the Command Palette (CMD + SHIFT + P), open the option Preferences: Open User Settings (JSON):
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.addMissingImports": true
},TypeScriptWichtig:
NICHT:
git clone https://fenomedia@bitbucket.org/fenomedia/homepage-3d.gitCode-Sprache: PHP (php)
SONDERN:
git clone fenomedia@bitbucket.org:fenomedia/homepage-3d.git Code-Sprache: PHP (php)
SSH Authentifizierung
Install OpenSSH on macOS
A version of OpenSSH should be pre-installed on macOS. To check if OpenSSH is installed, open a terminal and run:
<code>ssh -V</code>Code-Sprache: HTML, XML (xml)
The output should show the installed version of OpenSSH.
To use Homebrew to install a newer version of OpenSSH, run:
<code>brew install openssh</code>Code-Sprache: HTML, XML (xml)
To check that OpenSSH was installed successfully, run:
<code>ssh -V</code>Code-Sprache: HTML, XML (xml)
The output should show the installed version of OpenSSH.
Start the SSH agent
To allow git to use your SSH key, an SSH agent needs to be running on your device.
To check if it is already running, run the ps command. If the ssh-agent is already running, it should appear in the output, such as:
<code>$ ps -a | grep ssh-agent </code>
<code>myusername 3291 0.0 0.0 6028 464 ? Ss 07:29 0:00 ssh-agent</code>Code-Sprache: HTML, XML (xml)
To start the agent, run:
<code>eval $(ssh-agent)</code>Code-Sprache: HTML, XML (xml)
You may need to add this command to your ~/.bashrc, ~/.zshrc, ~/.profile, or equivalent shell configuration file. Adding this command to a shell configuration file will ensure the agent is running when you open a terminal.
Create an SSH key pair
To create an SSH key pair:
<code>cd ~</code>Code-Sprache: HTML, XML (xml)
ssh-keygen -t ed25519 -b 4096 -C "{username@emaildomain.com}" -f {ssh-key-name}Code-Sprache: JavaScript (javascript)
Once complete, ssh-keygen will output two files:
Add your key to the SSH agent
To add the SSH key to your SSH agent (ssh-agent):
ssh-add ~/{ssh-key-name}
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/{ssh-key-name}Code-Sprache: JavaScript (javascript)
Provide Bitbucket Cloud with your public key
To add an SSH key to a Bitbucket repository:
ssh-ed25529 LLoWYaPswHzVqQ7L7B07LzIJbntgmHqrE40t17nGXL71QX9IoFGKYoF5pJKUMvR+DZotTm user@example.comCode-Sprache: CSS (css)
Check that your SSH authentication works
To test that the SSH key was added successfully, open a terminal on your device and run the following command:
<code>ssh -T git@bitbucket.org</code>Code-Sprache: HTML, XML (xml)
If SSH can successfully connect with Bitbucket using your SSH keys, the command will produce output similar to:
<code>authenticated via ssh key. </code>Code-Sprache: HTML, XML (xml) const isTouchDevice = "ontouchstart" in document.documentElementJavaScriptHier am Beispiel einer Localization-Klasse
/**
* Localization class to manage translations and language settings.
*/
export default class Localization {
private static translations = {
en: {
right: "That's correct.",
wrong: "Unfortunately, this is wrong.",
next: "Next Step",
step: "Step"
},
de: {
right: "Das stimmt.",
wrong: "Das ist leider falsch.",
next: "Nächster Schritt",
step: "Schritt"
}
} as const;
private static currentLang: keyof typeof Localization.translations = 'de';
public static translate(key: keyof typeof Localization.translations['de']): string {
return Localization.translations[Localization.currentLang][key];
}
public static setLanguage(lang: keyof typeof Localization.translations) {
Localization.currentLang = lang;
}
public static getLanguage(): string {
return Localization.currentLang;
}
}TypeScriptDamit Typescript immer im Module-Modus kompiliert und entsprechend den Scope beachtet immer die CompilerOption setzen:
"moduleDetetection": "force"TypeScriptDer Standardspeicherort ist unter /[User]/Library/Services/
Um die Ausgabe der Zeit, bspw. der deutschen Monate zu erhalten folgendes in PHP:
setlocale(LC_TIME, 'de_DE.UTF-8');
$formatter = new IntlDateFormatter(
'de_DE',
IntlDateFormatter::LONG,
IntlDateFormatter::NONE
);
$date = (new DateTime(VAR_CONTAINING_THE_DATE))->format('d. F Y');
$date = $formatter->format(new DateTime($date));PHPÄhnlich wie mit Dockerumgebungen, kann man in Python Entwicklungsumgebungen kapseln bzw. isolieren. Damit hat man alle Abhängigkeiten innerhalb der Umgebung und kann flexibel zu globalen Pythoninstallation auch andere Paketversionen verwenden.
Außerdem lassen sich auf diese Weise eventuelle Versionskonflikte vermeiden und kann seine Systemumgebung schützen, weil diese unberührt bleibt.
Um eine solche Umgebung zu initialisieren folgendes:
python3 -m venv face_scrapperBashIm Anschluss aktiviert man diese Umgebung und signalisiert damit, dass alle Aktionen wie Installationen von Abhängigkeiten etc. innerhalb der Umgebung passieren sollen.
source face_scrapper/bin/activateBashWichtig: Wenn die Umgebung aktiviert ist, sollte man auch eine Veränderung der Prompt im Bash sehen!
Bsp.: zsh:

Um sich aus der Umgebung auszuloggen folgt einfach ein
deactivateBashAb und zu tritt auf dem Mac eine sehr hohe CPU-Last durch den LaunchService Deamon (lsd) auf. Das äußert sich durch permanente Lüfteraktivität.
Mit folgendem Befehl kann die LaunchService Datenbank neu aufgebaut werden, falls ein defekt vorliegt, was in den meisten Fällen Abhilfe schafft.
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain userBashMutagen resetten und Mutagen deaktiveren
ddev mutagen reset && ddev config global --performance-mode=none && ddev config --performance-mode=noneBash