Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| map $sent_http_content_type $expires { | |
| default off; | |
| text/html epoch; | |
| text/css max; | |
| application/javascript max; | |
| ~image/ max; | |
| font/ttf max; | |
| font/opentype max; | |
| application/font-woff max; | |
| font/woff2 max; |
| # Based on articles: | |
| # https://ruhighload.com/%D0%9A%D1%8D%D1%88%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5+%D1%81+nginx | |
| # https://wiki.enchtex.info/practice/nginx/cache | |
| # https://gist.github.com/yanmhlv/5612256 | |
| # https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html | |
| # https://blog.runcloud.io/2017/10/28/nginx-caching-tutorial-wordpress.html | |
| # https://www.digitalocean.com/community/tutorials/how-to-setup-fastcgi-caching-with-nginx-on-your-vps | |
| # https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/ | |
| certbot certificates | |
| # find the path to the fullchain certificate you wish to reinstall | |
| certbot revoke --cert-path /etc/letsencrypt/live/... #path to the cert from above | |
| certbot delete --cert-name yourdomain.com | |
| rm -Rf /etc/apache2/sites-available/000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on | |
| rm -Rf 000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on | |
| sudo apache2ctl restart | |
| certbot #follow the guide to setup the new certificate |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
| <?php | |
| global $wpdb; | |
| // Start Transaction | |
| $wpdb->query( "START TRANSACTION" ); | |
| // Do some expensive/related queries here | |
| //$wpdb->query("DELETE FROM table WHERE form_id = '1' "); | |
| //$wpdb->query("DELETE FROM data WHERE form_id = '1' "); | |
| // set $error variable value in error handling after $wpdb modifications |
| type FilterOperator = 'AND' | 'OR'; | |
| type FiltersBy<T> = { | |
| [K in keyof T]?: (value: T[K]) => boolean; | |
| }; | |
| /** | |
| * Factory function that creates a specialized function to filter | |
| * arrays, by validating all filters (AND operator), | |
| * or validating just one of the filters (OR operator). | |
| * @param operator Method to validate all filters: AND, OR |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |