Remove all files in current directory
rm -rf *
This file contains 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 | |
function get_browser_name($user_agent) | |
{ | |
if (strpos($user_agent, 'Opera') || strpos($user_agent, 'OPR/')) return 'Opera'; | |
elseif (strpos($user_agent, 'Edge')) return 'Edge'; | |
elseif (strpos($user_agent, 'Chrome')) return 'Chrome'; | |
elseif (strpos($user_agent, 'Safari')) return 'Safari'; | |
elseif (strpos($user_agent, 'Firefox')) return 'Firefox'; | |
elseif (strpos($user_agent, 'MSIE') || strpos($user_agent, 'Trident/7')) return 'Internet Explorer'; |
This file contains 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.sort(function(a, b) { | |
return a.prop - b.prop; | |
}); |
This file contains 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
## Change Visiblity on an Object | |
``` | |
// visible | |
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, true); | |
// invisible | |
api.scene.setAll({ name: 'object_name', plug: 'Properties', property: 'visible' }, false); | |
``` | |
## Get All Materials | |
``` |
This file contains 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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
This file contains 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
**Start a new container** | |
`docker run -d -p 6379:6379 --name [name] [container-type]` | |
**Check its running** | |
`docker ps` | |
**Log output** |
This file contains 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
**Get All Keys** | |
`KEYS *` | |
**Redis CLI** | |
`redis-cli` | |
**Close Redis CLI** |
This file contains 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
**Get Pods** | |
`kubectl get pods --context [context]` | |
**Get Services** | |
`kubectl get services --context [context]` |
This file contains 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
### Check Admin Password | |
``` | |
cat bitnami_application_password | |
``` | |
### Accessing PhpMyAdmin on Linux and Mac OSX | |
``` | |
ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP |
OlderNewer