A Pen by SolutionMonk on CodePen.
This file contains hidden or 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 | |
# | |
# Ubuntu System Setup Script | |
# | |
# This script automates the installation of commonly used tools on Ubuntu 24.10+. | |
# It is designed to be idempotent and maintainable, allowing easy addition and | |
# removal of tools. | |
# Exit on error, undefined variables, and pipe failures | |
set -euo pipefail |
This file contains hidden or 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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Type Checking */ | |
"strict": true, | |
"noImplicitAny": true, | |
"strictNullChecks": true, | |
"strictFunctionTypes": true, | |
"strictBindCallApply": true, | |
"strictPropertyInitialization": true, | |
"noImplicitThis": true, |
This file contains hidden or 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
/* Document | |
* ========================================================================== */ | |
/** | |
* 1. Correct the line height in all browsers. | |
* 2. Prevent adjustments of font size after orientation changes in iOS. | |
*/ | |
:where(html) { | |
line-height: 1.15; /* 1 */ |
This file contains hidden or 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
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Prevent font size inflation */ | |
html { |
This file contains hidden or 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 | |
# Enable location services and restart the location daemon. | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Enable location services. | |
enable_location_services() { | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool true |
This file contains hidden or 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
// Hello and welcome to the Array Homework program. This program is designed to demonstrate the use of arrays in C#. | |
// The program will create an array of 3 names, store them in an array variable | |
// prompt the user for a number to select a name from the array | |
// display the name selected by the user | |
// and check for invalid numbers entered by the user. | |
// The program will also demonstrate the use of a do while loop to display the names in the array. | |
string[] names = new string[3] { "John", "Jane", "Joe" }; | |
int nameIndex; |
This file contains hidden or 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
public class Car | |
{ | |
// Properties | |
public string Color { get; set; } | |
public string Model { get; set; } | |
public int Year { get; set; } | |
// Constructor | |
public Car(string color, string model, int year) | |
{ |
This file contains hidden or 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
/* | |
Requirements: Create a Console Application that has variables | |
to hold a person's name, age, if they are alive, and their phone number. | |
You do not need to capture these values from the user. | |
*/ | |
Console.WriteLine("Hello, and welcome to my first homework assignment"); |
This file contains hidden or 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
// true or false | |
bool isColorBlue = true; | |
bool isNotColorBlue = false; | |
string[] colors = new string[] { "blue", "red"}; | |
if (colors[1] != "red") | |
{ |
NewerOlder