#Testing
🤸♂️
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 | |
/** | |
* Genesis Sample. | |
* | |
* This file adds the full width page template to the Genesis Sample Theme. | |
* | |
* Template Name: Full Width | |
* | |
* @author StudioPress | |
* @link https://www.studiopress.com/ |
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 | |
/** | |
* Helper function to do a partial search for string inside array. | |
* | |
* @param array $array Array of strings. | |
* @param string $keyword Keyword to search. | |
* | |
* @return array | |
*/ |
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 | |
/** | |
* Get user's registered blogs/sites. | |
* | |
* @param int|bool $user_id User id or current user. | |
* | |
* @return array | |
*/ | |
public static function get_registered_sites_of_user( $user_id = false ) { |
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
#!/bin/bash | |
# Open Google chrome and start with google.com | |
google-chrome www.google.com | |
# Open terminal and go to /var/www/html | |
gnome-terminal --working-directory=/var/www/html | |
# Open netbeans (Make it last. This will take time). | |
/bin/sh "/usr/local/netbeans-8.1/bin/netbeans" |
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
<!-- Modify this according to your requirement --> | |
<h3> | |
Redirecting to duckdev.com after <span id="countdown">10</span> seconds | |
</h3> | |
<!-- JavaScript part --> | |
<script type="text/javascript"> | |
// Total seconds to wait | |
var seconds = 10; | |
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 | |
// Running validation | |
$this->validate($request, [ | |
'user_id' => 'bail|required|integer|unique:users,user_id' | |
]); |
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 | |
/** | |
* Check if a given string is a valid UUID | |
* | |
* @param string $uuid The string to check | |
* @return boolean | |
*/ | |
function isValidUuid( $uuid ) { | |
if (!is_string($uuid) || (preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', $uuid) !== 1)) { |