Portfolio
HTTP

[VPS] Netdata – Công cụ theo dõi hệ thống Real-time

September 28, 2016Category : IT & Network

Bạn có thể sử dụng tool này trên server để theo dõi gần như toàn bộ tình trạng hệ thống: Total and Per Core CPU usage, interrupts, softirqs and frequency. Total Memory, RAM, Swap and Kernel usage. Disk I/O (per disk: bandwidth, operations, backlog, utilization, etc). Monitors Network interfaces including: bandwidth, packets, errors, drops, etc)…

Read more
01.

[VPS] Rclone – Backup toàn bộ VPS lên Google Drive – Script sao lưu backup vps

September 28, 2016Category : IT & Network

Rclone là một công cụ đồng bộ hóa dữ liệu tương tự Rsync nhưng lại được tập trung phát triển chức năng kết nối với các dịch vụ lưu trữ đám mây. Ưu điểm của việc sử dụng dịch vụ lưu trữ đám mây đó là tốc độ cao (do có server được đặt trên khắp thế..

Read more
02.

Magento import produdct – fix product not show

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ error_reporting(E_ALL | E_STRICT); define(‘MAGENTO_ROOT’, getcwd()); $mageFilename = MAGENTO_ROOT . ‘/app/Mage.php’; require_once $mageFilename; Mage::app(); $ids = Mage::getModel(‘catalog/product’)->getCollection()->getAllIds(); Mage::getSingleton(‘catalog/product_action’)->updateAttributes( $ids, array(‘status’=>1, ‘visibility’=>4), 0 );  

Read more
03.

Magento remove duplicate img

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ include(‘app/Mage.php’); //Mage::App(‘default’); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); error_reporting(E_ALL | E_STRICT); Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); ob_implicit_flush (1); $mediaApi = Mage::getModel(“catalog/product_attribute_media_api”); $_products = Mage::getModel(‘catalog/product’)->getCollection(); $i =0; $total = count($_products); $count = 0; foreach($_products as $_prod) { $_product = Mage::getModel(‘catalog/product’)->load($_prod->getId()); $_md5_values = array(); //protected base image $base_image..

Read more
04.

Magento SQL update price and special price form csv

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ $mageFilename = ‘app/Mage.php’; require_once $mageFilename; Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); umask(0); Mage::app(‘admin’); Mage::register(‘isSecureArea’, 1); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); set_time_limit(0); ini_set(‘memory_limit’,’1024M’); /***************** UTILITY FUNCTIONS ********************/ function _getConnection($type = ‘core_read’){ return Mage::getSingleton(‘core/resource’)->getConnection($type); } function _getTableName($tableName){ return Mage::getSingleton(‘core/resource’)->getTableName($tableName); } function _getAttributeId($attribute_code = ‘price’){ $connection = _getConnection(‘core_read’); $sql..

Read more
05.

Hướng dẫn thay đổi tên miền giữ nguyên Rank

August 1, 2016Category : Code/Web

Nhiều bạn có liên hệ hỏi mình về sự ảnh hưởng từ khóa trên kết quả tìm kiếm Google, tất nhiên là bị ảnh hưởng chứ, rất nhiều là đằng khác. Thời gian đầu mình chứng kiến nhiều từ khóa mất top, thậm chí không còn xuất hiện trên Google nữa. Nhưng sau khoảng thời..

Read more
06.

PHP7 mysql lib to mysqli convert

July 2, 2016Category : Code/Web

Đây là thư viện để các bạn không phải sửa từng chút một trong code nữa thêm include hoặc require trong config.php là được <?php namespace { if (!function_exists(‘\mysql_connect’)) { define (‘MYSQL_ASSOC’, 1); define (‘MYSQL_NUM’, 2); define (‘MYSQL_BOTH’, 3); define (‘MYSQL_CLIENT_COMPRESS’, 32); define (‘MYSQL_CLIENT_SSL’, 2048); define (‘MYSQL_CLIENT_INTERACTIVE’, 1024); define (‘MYSQL_CLIENT_IGNORE_SPACE’, 256); function mysql_connect( $hostname =..

Read more
07.

Sử dụng hệ điều hành Kali Linux trên trình duyệt web

June 11, 2016Category : IT & Network

Đây là tin vui đối với hacker và các chuyên gia nghiên cứu bảo mật: Bạn đã có thể sử dụng hệ điều hành Kali Linux ngay trong một trình duyệt web. Kali Linux là một trong những bản phân phối được cộng đồng bảo mật yêu thích nhất và giờ đã được tích hợp..

Read more
09.

Create bot Facebook Messenger

April 21, 2016Category : Code/Web

Dưới đây là các bước để tạo một bot chat trên Facebook Messenger. 1. Thiết lập Messenger bot sử dụng web server để xử lý những tin nhắn mà nó nhận được hoặc tìm ra các tin nhắn để gửi. 1.1. Xây dựng server 1. Tải và cài đặt Heroku Toolbet tại đây để khởi..

Read more
010.

Bỏ qua hệ thống xác thực SMS của Google, Facebook,…

December 29, 2015Category : Thập cẩm

Google, Facebook, Youtube, Twitter là những dịch vụ online yêu cầu xác thực SMS để tránh việc một người có nhiều tài khoản.   Tuy nhiên, để bảo mật cho bản thân, hãy hạn chế cung cấp những thông tin cho họ. Hoặc nếu điện thoại của bạn đang gặp vấn đề, bài viết này sẽ đưa..

Read more
011.

PHP Auto create XML playlist file

December 5, 2015Category : Code/Web

List file create order by abc <?php // *** requires PHP5 *** // search for jpg files $filter = “.mp3”; // path to the directory you want to scan $directory = ‘./audio’; $it = new RecursiveDirectoryIterator(“$directory”); foreach( new RecursiveIteratorIterator($it) as $file) { if (!((strpos(strtolower($file), $filter)) === false)) { $items[] = preg_replace(“#\\\#”, “/”, $file); } }..

Read more
012.

Add videojs player html5 with javascript

November 18, 2015Category : Code/Web

index.php <div id=”video”><p> Restart or F5 browser to view this content.</p></div> <link href=”<?php echo get_template_directory_uri(); ?>/css/video-js.min.css” rel=”stylesheet”> <script src=”<?php echo get_template_directory_uri(); ?>/js/videojs.min.js”></script> <script src=”<?php echo get_template_directory_uri(); ?>/js/jquery.min.videojs.js”></script> <script type=’text/javascript’> var obj, source; obj = document.createElement(‘video’); $(obj).attr(‘id’, ‘example_video_test’); $(obj).attr(‘class’, ‘video-js vjs-default-skin’); $(obj).attr(‘controls’, ‘ ‘); $(obj).attr(‘poster’, ‘http://todaytv.club/movie_night_image.jpg’); $(obj).attr(‘preload’, ‘auto’); $(obj).attr(‘data-setup’, ‘{“inactivityTimeout”: 0}’); $(obj).attr(‘autoplay’, ‘true’); source = document.createElement(‘source’);..

Read more
013.

[WP] Hide My WP XSS vulnerability

November 2, 2015Category : Code/Web

Exploit Title: Hide My WP XSS vulnerability Date: 20-07-2015 Software Link: http://codecanyon.net/item/hide-my-wp-no-one-can-know-you-use-wordpress/4177158 Version 4.51.1 Google dork: ff957fea/includes/css/style.css Fix: turn off IDS logging

Read more
015.

[WP] W3 Total Cache settings with Cloudflare GUIDE

October 12, 2015Category : Code/Web

W3 Total cache is a WordPress Performance Optimization framework that is designed to improve user experience and page speed.  It is recommended by many web hosting providers, and used by countless major websites such as mashable.com as well as many others. W3TC  improves the user experience of your site by increasing web server performance by reducing..

Read more
016.
© Oliver / All rights reserved.
To top