Jump to content

_.:=iTake=:._

Superior Administrator
  • Posts

    1,855
  • Joined

  • Last visited

  • Days Won

    333
  • Donations

    20.00 USD 

Everything posted by _.:=iTake=:._

  1. CKEditor Proven, enterprise-grade WYSIWYG HTML editor with wide browser compatibility, including legacy browsers. [Hidden Content] CKEditor 4 Proven, enterprise-grade WYSIWYG HTML editor with wide browser compatibility, including legacy browsers. Features Paste from Word and Excel, spell check, accessibility checker, tables. Autocomplete, @mentions, widgets, code snippets, emoji plugins. Full control over content: HTML filtering, view source mode. Great accessibility: WCAG 2.0 AA and Section 508 compliant. Long-term support (LTS) until 2023. CKEditor 5 Modern JavaScript rich text editor with a modular architecture. Its clean UI and features provide the perfect WYSIWYG UX for creating semantic content. Features Written in ES6 with MVC architecture, custom data model, virtual DOM. Responsive images and media embeds (videos, tweets). Custom output format: HTML and Markdown support. Boost productivity with auto-formatting and collaboration. Extensible and customizable by design. Adding CKEditor to Your Page If the sample works correctly, you are ready to build your own site with CKEditor included. To start, create a simple HTML page with a <textarea> element in it. You will then need to do two things: Include the <script> element loading CKEditor in your page. Use the CKEDITOR.replace() method to replace the existing <textarea> element with CKEditor. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>A Simple Page with CKEditor</title> <!-- Make sure the path to CKEditor is correct. --> <script src="../ckeditor.js"></script> </head> <body> <form> <textarea name="editor1" id="editor1" rows="10" cols="80"> This is my textarea to be replaced with CKEditor. </textarea> <script> // Replace the <textarea id="editor1"> with a CKEditor // instance, using default configuration. CKEDITOR.replace( 'editor1' ); </script> </form> </body> </html> When you are done, open your test page in the browser. Congratulations! You have just installed and used CKEditor on your own page in virtually no time!
  2. Froala Editor The Next Generation WYSIWYG HTML Editor Beautiful Javascript web editor that's easy to integrate for developers and your users will simply fall in love with its clean design. [Hidden Content] The following code example illustrates how to handle file upload on your server using PHP as a server-side language. For step by step explanation of the upload flow see file upload concept. Frontend The main index page. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- Include Editor style. --> <link href="[Hidden Content]" rel="stylesheet" type="text/css" /> </head> <body> <div class="sample"> <h2>File upload example.</h2> <form> <textarea id="edit" name="content"></textarea> </form> </div> <!-- Include Editor JS files. --> <script type="text/javascript" src="[Hidden Content]; <!-- Initialize the editor. --> <script> new FroalaEditor('#edit', { // Set the file upload URL. fileUploadURL: '/upload_file.php', fileUploadParams: { id: 'my_editor' } }) </script> </body> </html> Backend upload_file.php file will do the upload part. It has basic file format validations this can be easily extended. The uploads directory must be set to a valid location before any uploads are made. The path can be any folder that is accessible and write available. After processing the uploaded image, if it passes the validation, the server will respond with a JSON object containing a link to the uploaded file. E.g.: {"link":"[Hidden Content]"}. <?php try { // File Route. $fileRoute = "/uploads/"; $fieldname = "file"; // Get filename. $filename = explode(".", $_FILES[$fieldname]["name"]); // Validate uploaded files. // Do not use $_FILES["file"]["type"] as it can be easily forged. $finfo = finfo_open(FILEINFO_MIME_TYPE); // Get temp file name. $tmpName = $_FILES[$fieldname]["tmp_name"]; // Get mime type. You must include fileinfo PHP extension. $mimeType = finfo_file($finfo, $tmpName); // Get extension. $extension = end($filename); // Allowed extensions. $allowedExts = array("txt", "pdf", "doc","json","html"); // Allowed mime types. $allowedMimeTypes = array("text/plain", "application/msword", "application/x-pdf", "application/pdf", "application/json","text/html"); // Validate file. if (!in_array(strtolower($mimeType), $allowedMimeTypes) || !in_array(strtolower($extension), $allowedExts)) { throw new \Exception("File does not meet the validation."); } // Generate new random name. $name = sha1(microtime()) . "." . $extension; $fullNamePath = dirname(__FILE__) . $fileRoute . $name; // Check server protocol and load resources accordingly. if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "off") { $protocol = "https://"; } else { $protocol = "http://"; } // Save file in the uploads folder. move_uploaded_file($tmpName, $fullNamePath); // Generate response. $response = new \StdClass; $response->link = $protocol.$_SERVER["HTTP_HOST"].dirname($_SERVER["PHP_SELF"]).$fileRoute . $name; // Send response. echo stripslashes(json_encode($response)); } catch (Exception $e) { // Send error response. echo $e->getMessage(); http_response_code(404); } ?>
  3. Here is a list of HTML Editors you can implement in your project. Here at GloTorrents we use SCEditor by creator Sam Clarke.. SCEditor A lightweight, open source, WYSIWYG BBCode and (X)HTML editor. [Hidden Content] Usage; Quick Start Include the JS & CSS: <link rel="stylesheet" href="minified/themes/default.min.css" /> <script src="minified/sceditor.min.js"></script> Initialize the editor BBCode <script src="minified/formats/bbcode.min.js"></script> <script> // Replace the textarea #example with SCEditor var textarea = document.getElementById('example'); sceditor.create(textarea, { format: 'bbcode', style: 'minified/themes/content/default.min.css' }); </script> XHTML <script src="minified/formats/xhtml.min.js"></script> <script> // Replace the textarea #example with SCEditor var textarea = document.getElementById('example'); sceditor.create(textarea, { format: 'xhtml', style: 'minified/themes/content/default.min.css' }); </script> We highly recommend this because its what we use at GloTorrents. We moved our Web server to NGINX so working on a few tweaks to make site run smoothly.!
  4. Install development tools To be able to build native modules from npm we will need to install the development tools and libraries: sudo yum install gcc-c++ make Source [Hidden Content]
  5. 3. Verify the Node.js and npm Installation To check that the installation was successful, run the following commands which will print the Node.js and npm versions. Print Node.js version: node --version v10.13.0 Print npm version: npm --version 6.4.1 How to install Node.js and npm using NVM NVM (Node Version Manager) is a bash script used to manage multiple active Node.js versions. NVM allows us to install and uninstall any specific Node.js version which means we can have any number of Node.js versions we want to use or test. To install Node.js and npm using NVM on your CentOS system, follow these steps: 1. Install NVM (Node Version Manager) To download the nvm install script run the following command: curl -o- [Hidden Content] | bash The script will clone the nvm repository from Github to ~/.nvm and add the script Path to your Bash or ZSH profile. => Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion As the output above shows, you should either close and reopen your terminal or run the commands to add the path to nvm script to your current session. To verify that nvm was properly installed type: nvm --version Output 0.33.11 2. Install Node.js using NVM Now that the nvm tool is installed we can install the latest available version of Node.js, by typing: nvm install node Output Downloading and installing node v11.0.0... Downloading [Hidden Content]... ######################################################################## 100.0% Computing checksum with sha256sum Checksums matched! Now using node v11.0.0 (npm v6.4.1) Creating default alias: default -> node (-> v11.0.0) Verify the Node.js version, by typing: node --version Output v10.1.0 Copy 3. Install multiple Node.js versions using NVM Let’s install two more versions, the latest LTS version and version 8.12.0 nvm install --ltsnvm install 8.12.0 Once LTS version and 8.12.0 are installed to list all installed Node.js instances type: nvm ls Output -> v8.12.0 # ACTIVE VERSION v10.13.0 v11.0.0 default -> node (-> v11.0.0) # DEFAULT VERSION node -> stable (-> v11.0.0) (default) stable -> 11.0 (-> v11.0.0) (default) iojs -> N/A (default) lts/* -> lts/dubnium (-> v10.13.0) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.14.4 (-> N/A) lts/carbon -> v8.12.0 lts/dubnium -> v10.13.0 The output tell us that the entry with an arrow on the left (-> v8.12.0), is the version used in the current shell session and the default version is set to v11.0.0. Default version is the version that will be active when opening new shells. To change the currently active version you can use the following command: nvm use 10.13.0 The output will look like something this: Now using node v10.13.0 (npm v6.4.1) To change the default Node.js version type: nvm alias default 10.13.0 Output default -> 10.13.0 (-> v10.13.0)
  6. Node.js is a cross-platform JavaScript run-time environment that allows server-side execution of JavaScript code. Node.js is mainly used on the back-end, but it is also popular as a full-stack and front-end solution.npm, short for Node Package Manager is the default package manager for Node.js and the world’s largest software repository for the publishing of open-source Node.js packages. This tutorial walks you through the steps to install Node.js and npm on a CentOS 7 machine. We will show you two different ways of installing Node.js and npm. In the first part of this tutorial we will install Node.js and npm using the yum package manager from the NodeSource repository. In the second part, we will teach you how to install Node.js and npm using the nvm script. If you need Node.js only for deploying Node.js applications then the simplest option is to install the Node.js packages using yum from the NodeSource repository. Prerequisites Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. Installing Node.js and npm on CentOS 7 NodeSource is a company dedicated to providing enterprise-grade Node support and they maintain a consistently-updated Node.js repository for Linux distributions. To install Node.js and npm from the NodeSource repositories on your CentOS 7 system, follow these steps: 1. Add NodeSource yum repository The current LTS version of Node.js is version 10.x. If you want to install version 8 just change setup_10.x with setup_8.x in the command below. Run the following curl command to add the NodeSource yum repository to your system: curl -sL [Hidden Content] | sudo bash - 2. Install Node.js and npm Once the NodeSource repository is enabled, install Node.js and npm by typing: sudo yum install nodejs When prompted to import the repository GPG key, type y, and press Enter.
  7. Checkout Google if you are interested in backing up to their Cloud Service [Hidden Content]
  8. Fast data import trick [iCODE]$ mysqldump -h localhost -u root -p --extended-insert --quick --no-create-info mydb mytable | gzip > mytable.sql.gz [/iCODE] A bit more about this line: [iCODE]--extended-insert:[/iCODE] it makes sure that it is not one INSERT per line, meaning a single statement can have dozens of rows. [iCODE]--quick:[/iCODE] useful when dumping large tables, by default MySQL reads the whole table in memory then dumps into a file, that way the data is streamed without consuming much memory. [iCODE]--no-create-info[/iCODE]: this means only the data is being exported, no CREATE TABLE statements will be added To do the import do this: Disable foreign key checks when importing batch data in MySQL [iCODE]SET foreign_key_checks = 0;[/iCODE] /* do you stuff REALLY CAREFULLY */ [iCODE]SET foreign_key_checks = 1;[/iCODE] Add SET FOREIGN_KEY_CHECKS=0; to the beginning of your sql file or [iCODE]cat <(echo "SET FOREIGN_KEY_CHECKS=0;") data.sql | mysql[/iCODE] or [iCODE]mysql --init-command="SET SESSION FOREIGN_KEY_CHECKS=0;"[/iCODE] You don't need to run SET FOREIGN_KEY_CHECKS=1 after as it is reset automatically after the session ends
  9. To export the data to a remote host. I advice using rsync for this. Eg. command to transfer the backup to a backup server.. rsync -av --progress /your/local/backup/directory/backup_$(date "+%b-%d-%Y-%H-%M-%S") .sql.gz [email protected]:/home/backups [iCODE]rsync -av --progress /your/local/backup/directory/backup_$(date "+%b-%d-%Y-%H-%M-%S") .sql.gz[/iCODE] rsync -- tool to transfer files -v flag needed to view the output of rsync --progress flag to see the progress of the transfer /your/local/backup/directory path to your backup directory backup_$(date "+%b-%d-%Y-%H-%M-%S") .sql.gz this will be your backup file if you used the backup eg.in my first post. [iCODE][email protected]:/home/backups[/iCODE] root the user that has access to the remote server receiving the backup, in my case it;s root, you can change this accordingly. @remote.ip.address.here the remote location or IP address eg. @45.36.324.23 : add this if the remote is using default SSH ports.. /home/backups this is the drectory you want the backup to be stored into
  10. All Databases You need SSH access and possible Super User Privileges to run this commands. [iCODE] mysqldump --all-databases | gzip > /path/backups/backup_$(date "+%b-%d-%Y-%H-%M-%S").sql.gz[/iCODE] [iCODE]mysqldump[/iCODE]: utility to dump mysql database [iCODE]-u [/iCODE]specifies the user with mysql privileges with DB privileges.. In this tutorial, I am using root user [iCODE]-p[/iCODE] specifies the password flag needed by the user. [iCODE]-h[/iCODE] flag specifies the host you are connecting to.. You can simply ignore this if its localhost but if it's a remote IP, you need to specify the IP address.. [iCODE]gzip[/iCODE]: Utility to compress the .sql file after dump file is created. [iCODE]date[/iCODE]: $(date "+%b-%d-%Y-%H-%M-%S") by adding this you are giving a date and time to your backups... Single Databases" If you're just trying to backup a simple database you can run this command [iCODE] mysqldump -h localhost -u root -ppassword dbname | gzip > /path/backups/backup_$(date "+%b-%d-%Y-%H-%M-%S").sql.gz[/iCODE]
  11. PROXMOX [Hidden Content] [Hidden Content] [Hidden Content]
  12. Sure, there are few bugs lying around, we are trying everything we can to fix them and make the site run smoothly. Thank you so much for reporting these bugs..
  13. RSS Feed has also been fixed, it's working now...
  14. It has been fixed, Today Torrents' Page is now working....
  15. It has been fixed now... Thanks for reporting..!!
  16. Maintenance is complete! Please report any bug you might find.
  17. PHP extensions for Memcache and Memcached are now available in the EasyApache 4 Experimental Repository. Here's the latest comment regarding this change from the memcached-in-easyapache4 feature request: Once you have reviewed the instructions and warnings on the Experimental Repository document, you can choose to enable the repo and install the packages via the following commands: yum install ea4-experimental yum install ea-php56-php-memcache yum install ea-php56-php-memcached Replace "php56" with the version of PHP you want to install the extensions on (e.g. php54, php55, php70). To installed the Memcached daemon, run this command: Code: yum install ea-memcached Source: [Hidden Content]
  18. We are currently working on a lot of fixes at the moment. Our Upload Function is currently bugged at the moment but will be fixed soon. Please inform us of any bugs you find We are sorry for the inconvenience.
  19. # # deb cdrom:[ubuntu-Server 19.04 _Disco Dingo_ - Release amd64 (20190416.1)]/ disco main restricted #deb cdrom:[ubuntu-Server 19.04 _Disco Dingo_ - Release amd64 (20190416.1)]/ disco main restricted # See [Hidden Content] for how to upgrade to # newer versions of the distribution. deb [Hidden Content] disco main restricted # deb-src [Hidden Content] disco main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb [Hidden Content] disco-updates main restricted # deb-src [Hidden Content] disco-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb [Hidden Content] disco universe # deb-src [Hidden Content] disco universe deb [Hidden Content] disco-updates universe # deb-src [Hidden Content] disco-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb [Hidden Content] disco multiverse # deb-src [Hidden Content] disco multiverse deb [Hidden Content] disco-updates multiverse # deb-src [Hidden Content] disco-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb [Hidden Content] disco-backports main restricted universe multiverse # deb-src [Hidden Content] disco-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb [Hidden Content] disco partner # deb-src [Hidden Content] disco partner deb [Hidden Content] disco-security main restricted # deb-src [Hidden Content] disco-security main restricted deb [Hidden Content] disco-security universe # deb-src [Hidden Content] disco-security universe deb [Hidden Content] disco-security multiverse # deb-src [Hidden Content] disco-security multiverse # This system was installed using small removable media # (e.g. netinst, live or single CD). The matching "deb cdrom" # entries were disabled at the end of the installation process. # For information about how to configure apt package sources, # see the sources.list(5) manual.
  20. SoftEtherVPN Daily Builds. To install SoftEtherVPN type in terminal: sudo apt-add-repository ppa:paskal-07/softethervpn && sudo apt-get update && sudo apt-get upgrade && sudo apt-get install softether-vpnserver Adding this PPA to your system You can update your system with unsupported packages from this untrusted PPA by adding ppa:paskal-07/softethervpn to your system's Software Sources. (Read about installing) sudo add-apt-repository ppa:paskal-07/softethervpn sudo apt-get update
  21. Ubuntu Sources.list ## Note, this file is written by cloud-init on first boot of an instance ## modifications made here will not survive a re-bundle. ## if you wish to make changes you can: ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg ## or do the same in user-data ## b.) add sources in /etc/apt/sources.list.d ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl # See [Hidden Content] for how to upgrade to # newer versions of the distribution. deb [Hidden Content] bionic main restricted # deb-src [Hidden Content] bionic main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb [Hidden Content] bionic-updates main restricted # deb-src [Hidden Content] bionic-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb [Hidden Content] bionic universe # deb-src [Hidden Content] bionic universe deb [Hidden Content] bionic-updates universe # deb-src [Hidden Content] bionic-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb [Hidden Content] bionic multiverse # deb-src [Hidden Content] bionic multiverse deb [Hidden Content] bionic-updates multiverse # deb-src [Hidden Content] bionic-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb [Hidden Content] bionic-backports main restricted universe multiverse # deb-src [Hidden Content] bionic-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb [Hidden Content] bionic partner # deb-src [Hidden Content] bionic partner deb [Hidden Content] bionic-security main restricted # deb-src [Hidden Content] bionic-security main restricted deb [Hidden Content] bionic-security universe # deb-src [Hidden Content] bionic-security universe deb [Hidden Content] bionic-security multiverse # deb-src [Hidden Content] bionic-security multiverse
  22. Set an admin password for VPNCMD # cd /usr/local/vpnserver # ./vpncmd At the VPN command prompt, we type [iCODE]ServerPasswordSet[/iCODE] ServerPasswordSet yourPassword
  23. Server checking Before going further, let’s check that the VPN server can operate normally To do that run the vpncmd command and use the check VPN tool. Service configuration Link binary files # ln -s /usr/local/vpnserver/vpnserver /usr/local/bin/vpnserver # ln -s /usr/local/vpnserver/vpncmd /usr/local/bin/vpncmd Create the file /lib/systemd/system/vpnserver.service # vim /lib/systemd/system/vpnserver.service and add following [unit] Description=SoftEther VPN Server After=network.target ConditionPathExists=!/usr/local/vpnserver/do_not_run [service] Type=forking ExecStart=/usr/local/vpnserver/vpnserver start ExecStop=/usr/local/vpnserver/vpnserver stop KillMode=process Restart=on-failure WorkingDirectory=/usr/local/vpnserver # Hardening PrivateTmp=yes ProtectHome=yes ProtectSystem=full ReadOnlyDirectories=/ ReadWriteDirectories=-/usr/local/vpnserver CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SYS_NICE CAP_SYS_ADMIN CAP_SETUID [install] WantedBy=multi-user.target Now the VPN server starts automatically on boot, and we are able to manage the vpnserver using systemctl # systemctl start vpnserver # systemctl status vpnserver # systemctl stop vpnserver Reload, enable and start the service # systemctl daemon-reload # systemctl enable vpnserver # systemctl restart vpnserver
  24. Preparing Upgrade the system # apt-get update && apt-get -y upgrade Install (if it’s not installed yet) build-essential for compilation purpose # apt-get -y install build-essential And other required packages # apt-get -y install wget curl gcc make wget tzdata git libreadline-dev libncurses-dev libssl-dev zlib1g-dev Installing SoftEther VPN Download the last stable version (marked rtm) or stable-beta, and save it in /tmp # wget "[Hidden Content]" -O /tmp/softether-vpnserver.tar.gz Uncompress the sources # tar -xzvf /tmp/softether-vpnserver.tar.gz -C /usr/local/ Remove unused file # rm /tmp/softether-vpnserver.tar.gz Install from the sources # cd /usr/local/vpnserver/ # make During the installation process, we will have to type 1 to read the Licence Agreement, type 1 again to confirm that we have read the License Agreement and finally type 1 to agree with the License Agreement. Kawin uses key i_read_and_agree_the_license_agreement, that does not require confirmation # make i_read_and_agree_the_license_agreement Change file permission # chmod 0600 * # chmod 0700 vpnserver # chmod 0700 vpncmd
×
×
  • Create New...
×
GloTorrents Community Forum
Home
Activities
Sign In
Search
More
×