- Download Xcode 14.3.1 via this link (you need to be signed in with your Apple Id) and install it
- Edit
Xcode.app/Contents/Info.plist
and change the Minimum System Version to12
- (Optional) Do the same for
Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Info.plist
(might require a restart of Xcode and/or Mac OS to make it open the simulator on run) - (Optional) Replace
Xcode.app/Contents/Developer/usr/bin/xcodebuild
with the one from 14.2 (or another version you have currently installed, such as 14.0). - (Optional) Execute
sudo xattr -cr /Applications/Xcode.app
if Error "Xcode is corrupted and cannot be opened" - If there are problems with the simulator, reboot your Mac
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
ls /etc/apt/sources.list.d | |
sudo rm -f /etc/apt/sources.list.d/myppa.list |
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
var sleepSetTimeout_ctrl; | |
function sleep(ms) { | |
clearInterval(sleepSetTimeout_ctrl); | |
return new Promise(resolve => sleepSetTimeout_ctrl = setTimeout(resolve, ms)); | |
} | |
await sleep(<duration>); |
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
const object = {a:2, b:4, c:6, d:8}; | |
Object.entries(object).forEach(([key, value], index) => { | |
console.log(`${index}: ${key} = ${value}`); | |
}); |
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
<?php | |
$langs = array("PHP", "JavaScript", "Python", "C++", "Ruby"); | |
$newLangsSpace = implode(" ", $langs); | |
$newLangsComma = implode(", ", $langs); | |
$newLangsHyphen = implode("-", $langs); | |
// Since we are printing a string, we can use echo to display the output in the browser | |
echo $newLangsSpace."<br>"."<br>"; | |
echo $newLangsComma."<br>"."<br>"; |
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
<?php | |
function inverse($x) { | |
if (!$x) { | |
throw new Exception('Division by zero.'); | |
} | |
return 1/$x; | |
} | |
try { | |
echo inverse(5) . "\n"; |
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
<?php | |
if ($divisor == 0) { | |
// Other error-levels: E_USER_NOTICE, E_USER_WARNING | |
trigger_error("Cannot divide by zero", E_USER_ERROR); | |
} | |
?> |
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
// Turns WordPress debugging on in wp-config.php | |
define('WP_DEBUG', true); | |
// Tells WordPress to log everything to the /wp-content/debug.log file | |
define('WP_DEBUG_LOG', true); | |
// Doesn’t force the PHP 'display_errors' variable to be on | |
define('WP_DEBUG_DISPLAY', false); | |
// Hides errors from being displayed on-screen |
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
# return 42 by exit code | |
# will triger error if set -e | |
exit 42 |
The tests you had listed :
- Single Parenthesis - ( ... ) is creating a subshell
- Double Parenthesis - (( ... )) is for arithmetic operation
- Single Square Bracket - [ ... ] is the syntax for the POSIX
test
- Double Square Brackets - [[ ... ]] is the syntax for bash conditional expressions (similar to
test
but more powerful)
NewerOlder