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
| DaySuffix() { | |
| case $(date +%d) in | |
| 01|21|31) echo "st";; | |
| 02|22) echo "nd";; | |
| 03|23) echo "rd";; | |
| *) echo "th";; | |
| esac | |
| } | |
| alias dailyfile="echo \"# $(date '+%A, %B %-d')$(DaySuffix), $(date '+%Y')\n\" > $(date '+%Y-%m-%d')-daily.md" |
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
| abiding | |
| acceding | |
| accelerating | |
| accepting | |
| accomplishing | |
| achieving | |
| acquiring | |
| activating | |
| adapting | |
| adding |
:g/^\(.*\)\n\1$/d
:g: The global (g) command in Vim, performs a certain action on lines that match a given pattern./^: This symbol denotes the start of a line.\(and\): These parentheses are used for grouping in regex. Everything between\(and\)is treated as a single group. This group can be referenced later..*: The dot (.) stands for any character except a newline. The asterisk (*) is a quantifier, meaning "zero or more of the preceding element". So,.*matches any string, including an empty string.\n: This represents a newline character.\1: This is a backreference to the first (and only) group that we defined earlier. In this case, it refers to the exact string that was matched inside the\(and\).$: This symbol denotes the end of a line.
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
| Aardvark | |
| Abyssinian | |
| Adelie Penguin | |
| Affenpinscher | |
| Afghan Hound | |
| African Bush Elephant | |
| African Civet | |
| African Clawed Frog | |
| African Forest Elephant | |
| African Palm Civet |
So you have you a little Laravel Repo and you want to use Sail. It was probably so easy to set up in the first place, but how in the hell are you planning to get this thing installed now?
You could use the composer/composer container to install composer dependencies, or you can use the laravelsail/php81-composer
docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/opt -w /opt laravelsail/php81-composer:latest composer install --ignore-platform-reqs
docker run --rm
-u "$(id -u):$(id -g)"
-v $(pwd):/opt
-w /opt \
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
| $nationals = array( | |
| 'Afghan', | |
| 'Albanian', | |
| 'Algerian', | |
| 'American', | |
| 'Andorran', | |
| 'Angolan', | |
| 'Antiguans', | |
| 'Argentinean', | |
| 'Armenian', |
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 | |
| $countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
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
| /** | |
| * Resursively flattens an Array of depth n | |
| * | |
| * @param aSrc Array to be flattened | |
| * @returns Array Single depth array | |
| */ | |
| var flatten = function(aSrc) { | |
| if (Array.isArray(aSrc) && aSrc.length > 0) { // Test that paramater is both array and non-zero length | |
| var head = aSrc[0], // Get first element from paramater |
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
| // test a | |
| var $testContainer = $('.test-container'), elem = $( '<p class="test_jquery_click">Test Elem</p>' ), counterArray = []; | |
| $testContainer.text(''); | |
| for (var i = 50; i >= 0; i--) { $testContainer.append( elem ); } | |
| $('p.test').click( function(e) { counterArray.push($(this)); }); | |
| $('.test-container > p.test_jquery_click').each(function() {$(this).click();}); | |
| console.dir( $testContainer ); | |
| //test b | |
| var $testContainer = $('.test-container'), elem = $( '<p class="test_jquery_trigger" onclick="$(this).trigger(\'test-click\');">Test Elem</p>' ), counterArray = []; |