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 | |
function validateURL($url) | |
{ | |
if (filter_var($url, FILTER_VALIDATE_URL) !== false) { | |
// Parse the URL to get its components | |
$parsedUrl = parse_url($url); | |
// Check the scheme | |
if (in_array($parsedUrl['scheme'], ['http', 'https'])) { |
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
ifconfig wlan0 down | |
iw reg set GY | |
ifconfig wlan0 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 | |
/** | |
* Close the connection to the browser but continue processing the operation | |
* @param $body | |
*/ | |
public function closeConnection($body, $responseCode){ | |
// Cause we are clever and don't want the rest of the script to be bound by a timeout. | |
// Set to zero so no time limit is imposed from here on out. | |
set_time_limit(0); |
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 | |
optimize() { | |
jpegoptim *.jpg --strip-all | |
optipng *.png | |
for i in * | |
do | |
if test -d $i | |
then | |
cd $i | |
echo $i |