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
| #! /bin/sh | |
| GLASSFISH_PATH=/opt/glassfish | |
| # Install Dependencies | |
| add-apt-repository -y ppa:webupd8team/java | |
| apt-get update | |
| echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
| apt-get install oracle-java8-installer | |
| apt-get install unzip |
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
| -- Script to analyze table space usage using the | |
| -- output from the sp_spaceused stored procedure | |
| -- Works with SQL 7.0, 2000, and 2005 | |
| set nocount on | |
| print 'Show Size, Space Used, Unused Space, Type, and Name of all database files' | |
| select | |
| [FileSizeMB] = |
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
| $x = "My string"; | |
| ob_start(); | |
| var_dump( $x ); | |
| $contents = ob_get_contents(); | |
| ob_end_clean(); |
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 DATABASE _DATABASE_; | |
| GRANT ALL PRIVILEGES ON _DATABASE_.* TO _USER_@localhost IDENTIFIED BY '_PASSWORD_'; | |
| FLUSH PRIVILEGES; |
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
| #!/bin/bash | |
| git checkout --orphan NEWBRANCH | |
| git 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
| #!/bin/bash | |
| git checkout NEWBRANCH | |
| git merge -s ours master | |
| git checkout master | |
| git merge NEWBRANCH |
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
| /** | |
| * Redirect wp-login.php to custom login page. | |
| */ | |
| function custom_login(){ | |
| global $pagenow; | |
| if( 'wp-login.php' === $pagenow ) { | |
| $site_url = get_bloginfo( 'url' ); | |
| $redirect_to = "$site_url/login"; |
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
| mkdir C:\bin | |
| C:\bin | |
| composer create-project wp-cli/wp-cli --no-dev | |
| # Copy wp-cli\bin to path |
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
| if (false === base64_decode($str, true)) { | |
| echo 'Not a Base64-encoded string'; | |
| } |
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
| (SELECT INSERT(INSERT(INSERT(INSERT(MD5(UUID()), 9, 0, '-'), 14, 0, '-'), 19, 0, '-'), 24, 0, '-')) |