A Pen by Beau Carnes 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
| version: 0.2 | |
| #env: | |
| #variables: | |
| # key: "value" | |
| # key: "value" | |
| #parameter-store: | |
| # key: "value" | |
| # key: "value" | |
| #git-credential-helper: yes |
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
| -='cd -' | |
| ...=../.. | |
| ....=../../.. | |
| .....=../../../.. | |
| ......=../../../../.. | |
| 1='cd -' | |
| 2='cd -2' | |
| 3='cd -3' | |
| 4='cd -4' | |
| 5='cd -5' |
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 | |
| return PhpCsFixer\Config::create() | |
| ->setRules([ | |
| '@PSR2' => true, | |
| 'array_syntax' => ['syntax' => 'short'], | |
| 'combine_consecutive_unsets' => true, | |
| 'method_separation' => true, | |
| 'no_multiline_whitespace_before_semicolons' => true, | |
| 'single_quote' => 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
| let regex; | |
| /* matching a specific string */ | |
| regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
| regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
| regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
| /* wildcards */ | |
| regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
| regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
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
| /* 20 String Methods */ | |
| var stringOne = "freeCodeCamp is the best place to learn" | |
| var stringTwo = "frontend and backend development" | |
| // charAt() | |
| console.log(stringOne.charAt(1)) | |
| // charCodeAt() | |
| console.log(stringOne.charCodeAt(1)) |