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 | |
/* | |
* Verifies if the captcha data via Google and redirects to the form page if the captcha does not pass. | |
* Great for custom contact forms. | |
* | |
* Important! : this function requires php-curl or php5-curl library | |
* Parameters: | |
* Gcaptcha response - the form data submitted with the request. | |
** Example call if your form used method='get': verify_captcha($_GET['g-recaptcha-response'], "Secret key here"); | |
** Example call if your form used method='post': verify_captcha($_POST['g-recaptcha-response'], "Secret key here"); |
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 | |
### | |
# This script can be used to resize and watermark tons of images with this single script | |
# | |
# | |
# Requirements: Imagemagick package installed | |
# Debian: $ sudo atp-get install imagemagick | |
# MacOs: $ brew install imagemagick | |
# |
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 | |
##checks if mysql and apache is up and running, also can be used to start the service on Debian type systems | |
## Contact: nissim at companyoftwo dot in | |
APUP=$(pgrep apache2 | wc -l); | |
MYUP=$(service mysql status | wc -l); | |
if [ "$MYUP" -lt 2 ]; | |
then |