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
### | |
# | |
# Easy Mooty Server installer | |
# | |
# wget http://gist.github.com/script_name.sh | |
# sudo sh script_name.sh | |
# | |
### | |
# Funcs # |
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 | |
#-------------------- Config vars -------------------# | |
S3_BUCKET=your_s3_bucket | |
# Files | |
BACKDIR=~/backups | |
BACKTARGET=~/files |
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
git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached |
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 substr_paragraph($string, $length = 520, $html = false) { | |
$pos = strpos($string, "</p>",$length); | |
$tag_len = 4; | |
if(empty($pos)){ | |
$pos = strpos($string, "</div>",$length); | |
$tag_len = 5; |
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 | |
# Usage "sh script.sh /path/to/check" | |
if [ -z "$1" ]; then | |
vir_dir="`./virus`" | |
else | |
vir_dir="$1" | |
fi | |
[email protected]; |
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 | |
extarray=( mp3 flac ogg wmv wav ) ; | |
HOME=$1; | |
DESTINATION=$2; | |
#if [ $HOME == "/" || $HOME == $DESTINATION ] { exit 1 } | |
cd $HOME; |
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 | |
$conf = array( | |
"backup_prefix" => "bc-", | |
"backup_dir" => dirname(__FILE__).'/backups/', | |
"backup_files" => true, | |
"backup_target_dir" => '/folder', | |
"keep_local_files" => true, | |
"local_backup_size_limit" => "80GB", // in what you want, like 1GB or 2MB | |
"local_backup_time_limit" => 7, // in days, 0 for no limit |
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
# Image (Lightroom online) tools # | |
https://v3.polarr.co/ | |
# Vector image editor # | |
http://editor.method.ac/ | |
# Compression/Optimisation Image # | |
https://tinyjpg.com/ or https://tinypng.com/ | |
# Lorem ipsum (alternative) # |
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 | |
/** | |
* @author: Matthieu Loye Deroubaix / @matloyed | |
* @website : http://www.agence-malttt.fr/ | |
* Do what you want with this file :) | |
* Usage : http://gifme.domain.tld/?url=http://www.domain.tld/blablabla.gif | |
*/ |
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
#runs a check of your website http code response (Bad gateway, empty response, or service off) every half minute then send sms if reboot via Free Mobile API | |
jobjob() | |
{ | |
var=`curl -I http://www.zogzog.com/ 2>/dev/null | head -n 1 | awk -F" " '{print $2}'` | |
if [[ -z "$var" ]] || [ "$var" == "502" ] || [ "$var" == "324" ] | |
then | |
curl -I "https://smsapi.free-mobile.fr/sendmsg?user=___&pass=___&msg=$var%20Serv%20Autorestart%20!"; | |
sudo service nginx restart; sudo service php7.0-fpm restart; |