How to upload a backup of files to the cloud ?

How to upload a backup of files to the cloud - The secure way:


NOTE: Never, ever upload privacy sensitive data to cloud services!

Programs needed: pv, gnupg2, progress and split

Step 1 - make a archive to reduce space usage
tar cf - /folder-with-files | pv -s $(du -sb /folder-with-files | awk '{print $1}') | gzip > files.tgz

Step 2 - encrypt your data with gnupg2
gpg -c files.tgz &
progress -mp $!

Step 3 - Calculate the size of your encrypted archive
du -sh files.tgz.gpg

Step 4 - cut the encrypted archive in parts of your desired size (100MB in this example)
split -db 100M files.tgz.gpg files.tgz.gpg.part

Step 5 - Upload the parts to your desired cloud.

Written by Erwin Oldebsten 29/05/2017

How to Upload a File and limit its size or type with PHP

It is easy to upload a file to the server with PHP

1. First you must configure PHP to allow file upload
In your "php.ini" file, search for the file_uploads directive, and set it to On:
Code :
file_uploads = On

2. Then, you have to create a HTML form that allow users to choose the file or the image they want to upload, using this code
Code File Link:  http://ow.ly/xL7w304Zg3v

Notes:
Some rules to follow for the HTML form above:
    - Make sure that the form uses method="post"
    - The form also needs the following attribute: enctype="multipart/form-data". It specifies which content-type to use when submitting the form
Without the requirements above, the file upload will not work.
Other things to notice:
    - The type="file" attribute of the <input> tag shows the input field as a file-select control, with a "Browse" button next to the input control

The form above sends data to a file called "upload.php", which we will create next.

3. Then you will create the upload file PHP script
The "upload.php" file contains the code for uploading a file:
Code File link : http://ow.ly/Rygr304Zgfy

Note: You will need to create a new directory called "uploads" in the directory where "upload.php" file resides. The uploaded files will be saved there.

4. File Already Exists:
First, we will check if the file already exists in the "uploads" folder. If it does, an error message is displayed, and $uploadOk is set to 0 as you can see in this Code File link : http://ow.ly/iV11304ZgpK

5. Limit File Size:
Now, we want to check the size of the file. If the file is larger than 500KB, an error message is displayed, and $uploadOk is set to 0, You can download the Code File here : http://ow.ly/QlTv304ZgDf

6. Limit File Type:
if you want to allow users to upload JPG, JPEG, PNG, and GIF files. All other file types gives an error message before setting $uploadOk to 0:
Code File Link: http://ow.ly/Oio2304ZgLI

HOW TO UPLOAD THINGS TO CYTUBE (WITHOUT GOOGLE DRIVE)

1. Download Handbrake (https://handbrake.fr/)
2. ReEncode the video file into .mp4. Try to keep the file size under 200mb or else it won't upload (burn in the subs if need be)
3. upload to a file upload site (https://nya.is/ works for me)
4. Add link as a video to cytube
5. Voila

How to: vBulletin Sitemap Generator on multiple webserver

How to: vBulletin Sitemap Generator on multiple webserver

Turn off the sitemap-generator cronjob in vbulletin admincp
Now we create a conjob:

cmd> crontab -e 

Change the lines below to match your path and credentials and put them in a new cron:

php /path/to/forum/vbseo_sitemap/vbseo_sitemap.php
scp /path/to/forum/vbseo_sitemap/data/*.gz user1@host1:directory/
scp /path/to/forum/vbseo_sitemap/data/*.gz user2@host2:directory/

How to turn off UIWebView horizontal bounce

How to turn off UIWebView horizontal bounce



for (id subview in webView.subviews
{
    if ( [[subview class] isSubclassOfClass:[UIScrollView class]] )
    {
        ((UIScrollView*) subview).bounces = NO;
        ((UIScrollView*) subview).alwaysBounceVertical = NO;
        ((UIScrollView*) subview).alwaysBounceHorizontal = NO;
        ((UIScrollView*) subview).bouncesZoom = NO;          
    }
}
NSString* scriptToPreventBouncing = @"<script type="text/javascript"> document.ontouchmove = function(e){ e.preventDefault(); } </script>";
NSString* footerHTML = @"<div>All rights reserved</div>";
[footer loadHTMLString: [scriptToPreventBouncing stringByAppendingString:footerHTML] baseURL:[NSURL URLWithString:@"http://somewebsite.com"]];
UIWebView *webView = [[UIWebView alloc] ....];
webView.scrollView.scrollEnabled = NO;
webView.scrollView.bounces = NO;

GUIDE TO TURN OFF REDDOSUKATO'S AI



1. OTOME DAIYOUSEI
Turn off auto AI: In Otome_Daiyousei_-3.st under [state -3, AI‹N“®], change var(59) = 1 to var(59) = 0

2. KOA MELT
Turn off auto AI: In Meruto_06_-3.st under [state -3, VarSet AI‹N“®ƒRƒ}ƒ“ƒh] change var(59) = 1 to var(59) = 0

3. ELIZABETH REMILIA
Turn off auto AI: In Elizabeth_Remilia_St06_AI.st under [state -3, VarSet AI‹N“®ƒRƒ}ƒ“ƒh] change var(59) = 1 to var(59) = 0

4. CORNELIA
Turn off auto AI: In Cornelia_AI.st under [state -3, VarSet AI‹N“®ƒRƒ}ƒ“ƒh] change var(59) = 1 to var(59) = 0

5. PATCHOULI KISHINAMI
Turn off auto AI: In patchouli_St08_-2.st under [state -3, Varset AI‹N“®], change var(59) = 1 to var(59) = 0

6. REISEN_RA
Turn off auto AI: In Reisen_AI.st under [State -3, AI], change value = 1 to value = 0

7. GURUGURU FLAN
Turn off auto AI: In G_Flan_St09_AI.st under [State -3, VarSet], change value = 1 to value = 0

How to Setup WordPress to Use SSL and HTTPS

How to Setup WordPress to Use SSL and HTTPS

If you are starting a new site and/or want to use HTTPS everywhere on your site, then you need to update your site URL.
You can do this by going to Settings » General and updating your WordPress and site URL address fields.

Add to .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
</IfModule>