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
| function nl2br (str, is_xhtml) { | |
| if (typeof str === 'undefined' || str === null) { | |
| return ''; | |
| } | |
| var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>'; | |
| return (str + '').replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1' + breakTag + '$2'); | |
| } |
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
| 114.4.164.187 assets.nflxext.com | |
| 69.172.200.241 ir.netflix.com | |
| 52.84.49.252 media.netflix.com | |
| 54.71.111.34 www.netflix.com | |
| 52.38.152.174 help.netflix.com | |
| 54.187.232.55 jobs.netflix.com | |
| 114.4.164.187 codex.nflxext.com | |
| 34.233.159.233 netflix.com | |
| 52.27.34.11 api-global.netflix.com | |
| 54.68.31.82 ichnaea.netflix.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
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class ForceSSL | |
| { | |
| /** | |
| * Handle an incoming request. |
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
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Support\Facades\Redirect; | |
| class PreferredDomain | |
| { | |
| /** |
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
| var pattern = /^(https?:\/\/)?(www\.)?facebook.com\/[a-zA-Z0-9(\.\?)?]/; | |
| var url = $("#facebook_url").val(); | |
| if( pattern.test(url) ){ | |
| $("#order").submit(); | |
| } else { | |
| e.preventDefault(); | |
| alert('Your Facebook URL Invalid'); | |
| } |
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
| <?php | |
| /** | |
| * Set any link as active by adding active class | |
| * @param [uri] $uri Current URI | |
| * @param string $ouput CLASS class name | |
| */ | |
| function set_active($uri, $output = 'active') | |
| { | |
| if( is_array($uri) ) { | |
| foreach ($uri as $u) { |
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
| /** | |
| * @param $name | |
| * @param int $id | |
| * @return string | |
| * @throws \Exception | |
| */ | |
| public function createSlug($name, $id = 0) | |
| { | |
| // Normalize the name | |
| $slug = str_slug($name); |
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
| /** | |
| * custom text button woocommerce single | |
| */ | |
| add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_text_button_woocommerce_single' ); | |
| function custom_text_button_woocommerce_single( $label ) { | |
| global $product; | |
| $product_type = $product->product_type; |
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 | |
| while [ true ] | |
| do | |
| THEDIR=/tmp/apache-watchdog | |
| mkdir -p $THEDIR | |
| if ( wget --timeout=10 -q -P $THEDIR https://yourdomain.com/) | |
| then | |
| # we are up | |
| echo "Server up" |
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
| <?php | |
| $curl = curl_init(); | |
| $zillow_url = 'https://www.zillow.com/homedetails/5339-Summit-Hollow-Dr-Houston-TX-77084/89649115_zpid/'; | |
| curl_setopt_array($curl, array( | |
| CURLOPT_URL => $zillow_url, | |
| CURLOPT_RETURNTRANSFER => true, | |
| CURLOPT_ENCODING => "", | |
| CURLOPT_MAXREDIRS => 10, | |
| CURLOPT_TIMEOUT => 30, |