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
<input type="text" class="text" name="mobilePhone" id="mobilePhone" value="" parsley-regex-message="Please enter a valid Australian mobile phone number." parsley-regexp="^\(?(?:\+?61|0)4\)?(?:[ -]?[0-9]){2}\)?(?:[ -]?[0-9]){5}[0-9]$"/> |
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 | |
echo "Enter ssh username & host you want to add your key to in the following format: username@host.com" | |
read host | |
IP=$(curl -Sfs https://wtfismyip.com/text) | |
KEY=$(cat ~/.ssh/id_rsa.pub) | |
echo 'Adding Key to '$host': from="'$IP'"' $KEY | |
echo 'from="'$IP'"' $KEY | ssh $host 'cat >> ~/.ssh/authorized_keys' | |
exit; |
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
=-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
List all IP's hitting any domain | |
=-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
less /home/*/access-logs/* | awk '{print $1}' | sort | uniq -c | sort -n | |
=-+=-+=-+=-+=-+=-+=-+=-+=-+= | |
List all IP's hitting POSTING to any domain | |
=-+=-+=-+=-+=-+=-+=-+=-+=-+= |
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
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent http://domain.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 | |
include_once './includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
drupal_flush_all_caches(); | |
?> |
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
SELECT table_schema "DB Name", | |
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" | |
FROM information_schema.tables | |
where table_schema='REPLACE_WITH_DATABASE_NAME' | |
GROUP BY table_schema; |
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
JPEGS | |
find uploads/ -type f -iname '*.jpg' -exec jpegoptim --strip-all {} + | |
PNG | |
find uploads/ -iname "*.png" -exec pngquant --force --quality=40-100 --skip-if-larger --strip --verbose \{} --output \{} \; |
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
rsync -ravzv -e ssh user@externalserver.com:/home/user/test/* --include=".*" /home/user/test |
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
add_action( 'gform_after_submission', 'site_gform_after_submission', 10, 2 ); | |
function site_gform_after_submission ( $entry, $form ) { | |
GFAPI::delete_entry( $entry['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
# add this to your .bash_profile | |
export PATH=$PATH:$HOME/bin | |
_complete_ssh_hosts () | |
{ | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
cut -f 1 -d ' ' | \ |
NewerOlder