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
| ~/.zshrc | |
| bindkey "\e\eOD" backward-word | |
| bindkey "\e\eOC" forward-word |
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
| find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
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 bash | |
| ### BEGIN INIT INFO | |
| # Provides: autostart.sh | |
| # Required-Start: $remote_fs | |
| # Required-Stop: $remote_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Autostart | |
| # Description: AutoStart | |
| ### END INIT INFO |
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
| update_option('siteurl','http://example.com'); | |
| update_option('home','http://example.com'); |
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
| html2canvas(document.getElementsByClassName('parent-container')[0], { | |
| onrendered : function(canvas){ | |
| document.querySelector('.parent-container').style.display = 'none' | |
| let div = document.createElement('div') | |
| div.classList.add('parent-container-canvas') | |
| div.classList.add('parent-container') | |
| div.appendChild(canvas) | |
| document.body.appendChild(div) | |
| }) |
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
| Array.filter((val, index, self) => { | |
| return self.indexOf(val) === index | |
| }) |
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
| process.on('unhandledRejection', (reason, p) => { | |
| console.log('Unhandled Rejection at: Promise', p, 'reason:', reason) | |
| }); |
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
| mongodump -d <database_name> -o <directory_backup> | |
| mongorestore -d <database_name> <directory_backup> |
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
| https://stumbles.id.au/nginx-dynamic-image-resizing-with-caching.html | |
| server { | |
| # Internal image resizing server. | |
| server_name localhost; | |
| listen 8888; | |
| location ~ "^/cdn/(?<width>\d+)/(?<image>.+)$" { | |
| alias /var/www/website/public/$image; | |
| image_filter resize $width -; |
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
| create credential | |
| https://console.developers.google.com/apis/credentials | |
| create service account | |
| https://console.developers.google.com/iam-admin/serviceaccounts/ | |
| add analytics user management from service account email |
NewerOlder