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
<?php | |
/** | |
* Lorem Ipsum Generator | |
* | |
* PHP version 5.3+ | |
* | |
* Licensed under The MIT License. | |
* Redistribution of these files must retain the above copyright notice. | |
* |
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
#!/usr/bin/env php | |
# Dependency: This script requires PHP | |
# Install PHP: https://www.php.net/manual/en/install.php | |
# | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Lorem Ipsum | |
# @raycast.mode compact | |
# @raycast.packageName Lorem Ipsum |
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
#------------------ | |
# Shell Variables | |
#------------------ | |
# Specify VS Code as default editor for the React Native Simulator | |
export REACT_EDITOR=code-insiders | |
# Set VS Code Insiders as default code editor | |
export EDITOR=code-insiders | |
# Android SDK | |
export ANDROID_HOME=~/Library/Android/sdk |
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
# Main Colors | |
unrecognized_file: palegreen | |
recognized_file: turquoise | |
dir: dodgerblue | |
# Link | |
dead_link: red | |
link: cyan | |
# Access Modes |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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
const fillArray = <ArrayElementType>(len: number, elem: ArrayElementType) => { | |
return new Array<ArrayElementType>(len).fill(elem); | |
}; | |
const newArray = fillArray<string>(3, 'hi'); // => ['hi', 'hi', 'hi'] | |
newArray.push('bye'); // ✅ | |
newArray.push(true); // ❌ - only strings can be added to the array |
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
enum ThemeColors { | |
Primary = 'primary', | |
Secondary = 'secondary', | |
Dark = 'dark', | |
DarkSecondary = 'darkSecondary', | |
}; |
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
// Optional function parameter | |
function callMom(message?: string) { | |
if (!message) { | |
console.log('Hi mom. Love you. Bye.'); | |
} else { | |
console.log(message); | |
} | |
} | |
// Interface describing an object containing an optional property |
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
let list: [string, string, number]; | |
list = ['apple', 'banana', 8.75]; // ✅ | |
list = ['apple', true, 8.75]; // ❌ - the second argument should be of type string | |
list = ['apple', 'banana', 10.33, 3]; // ❌ - the tuple specifies a length of 3, not 4 |
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
type Student = { | |
id: string; | |
age: number; | |
}; | |
type Employee = { | |
companyId: string; | |
}; | |
let person: Student & Employee; |
NewerOlder