Portfolio
Code/Web

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
01.

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
02.

Hide / Show sider bar Javascript

December 1, 2015Category : Code/Web

Javascript <script language=javascript type=’text/javascript’> readCookie = function (name) { var nameEQ = name + “=”; var ca = document.cookie.split(‘;’); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ‘ ‘) c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return “es”; } function hideDiv()..

Read more
03.

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
04.

[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
06.

[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
07.

Isometric Angle Text Using CC3

September 22, 2015Category : Code/Web

HTML code: <h1>ISOMETRIC TEXT</h1> <p> Here’s a reworking of my original CSS3 Isometric Text demo, this version improves on the first attempt by using the CSS :after selector to duplicate the title to create the shadow – in fact the title IS the shadow &amp; the Isometric lettering is the :after content. </p> CSS code:..

Read more
08.

Snake Game Code

September 22, 2015Category : Code/Web

HTML code: <canvas id=”canvas”></canvas> <div id=”reMenu”> <h1 id=”snake2″>Snake</h1> <p id=”info2″>Game Over</p> <a href=”javascript: void(0)” id=”restart” onclick=”reset()” >Restart</a> <a href=”#” id=”tweet” target=”_blank” rel=”nofollow”>Tweet My Score</a> </div> <div id=”menu”> <h1 id=”snake”>Snake</h1> <p id=”info”>by <a target=”_blank” rel=”nofollow” href=”http://twitter.com/SolitaryDesigns”>Kushagra Agarwal</a></p> <a href=”javascript: void(0)” id=”start” onclick=”init()” >Start</a> <p id=”loading”>Loading…</p> </div> <p id=”score”>Score: 0</p> <!– Audio –> <audio id=”main_music” loop> <source..

Read more
09.

Jumping Game

September 22, 2015Category : Code/Web

  HTML code: <!DOCTYPE HTML> <html lang=”en-US”> <head> <title>Jump</title> </head> <body> <div class=”container”> <canvas id=”canvas”> Aww, your browser doesn’t support HTML5! </canvas> <div id=”mainMenu”> <h1>Milo Jump</h1> <h3>using HTML5,</h3> <h3>…by <a href=”http://twitter.com/solitarydesigns/” target=”_blank”>Kushagra Agarwal</a></h3> <h3>and <a href=”http://cssdeck.com” target=”_blank”>CSSDeck</a></h3> <p class=”info”> use <span class=”key left”>←</span> <span class=”key right”>→</span> to move and space to (re) start… </p> <a..

Read more
010.

Beautiful Line Effects with Color Changes

September 22, 2015Category : Code/Web

HTML <canvas></canvas> <script src=”https://code.jquery.com/jquery-1.11.1.min.js”></script> CSS: html, body { background: #000; margin: 0; } canvas { position: absolute; } JS: //Forked from http://andreasstorm.com/ //Made by Bogden //CANVAS $(function(){ var canvas = document.querySelector(‘canvas’), ctx = canvas.getContext(‘2d’) canvas.width = window.innerWidth; canvas.height = window.innerHeight; ctx.lineWidth = .3; ctx.strokeStyle = (new Color(150)).style; var mousePosition = { x: 30 * canvas.width..

Read more
011.

CSS slider – without JS

September 22, 2015Category : Code/Web

CSS slider – without JS – code 1: http://cssdeck.com/labs/css3-image-slider

css-slider1

(more…)

Read more
012.

[MSSQL Server] Code xóa Logfile

September 17, 2015Category : Code/Web IT & Network

Declare @SQLQuerry nvarchar(255) Declare @dbname nvarchar(255) Declare @CrsrVar Cursor Set @CrsrVar = Cursor For SELECT name FROM sys.databases where name not in (‘tempdb’,’distribution’,’master’,’model’,’msdb’,’ReportServer’,’ReportServerTempDB’) Open @CrsrVar Fetch Next From @CrsrVar into @dbname While(@@FETCH_STATUS = 0) Begin — Truncate the log by changing the database recovery model to SIMPLE. SET @SQLQuerry = ‘USE [‘ +@dbname +’];ALTER DATABASE..

Read more
013.

Ajax Username Validation with PHP and MySQL

August 20, 2015Category : Code/Web

Tutorial for ajax username validation using jquery and php to check if the username is available in the mysql database. Requirements jQuery Library Database and table First create a database in mysql and create a table called members in it.

Read more
014.

Điều cần phải làm trước khi ra mắt trang web Magento

August 20, 2015Category : Code/Web

1. Thay đổi Base URLs Những URL này được lưu trữ trong cơ sở dữ liệu của Magento, khoá core_config_data. Bạn cũng có thể thay đổi nó trong Admin của Magento bằng cách vào System > Configuration > Web. Bạn chỉ thay đổi cái này khi bạn chuyển domain hoặc đổi kiểu domain, ví dụ khi bạn cài SSL cho trang web..

Read more
015.

Shortstack – Giải pháp DIY để làm app cho Fanpage của bạn

June 29, 2015Category : Code/Web

Bạn có bao giờ mong muốn bản thân có khả năng lập trình để tạo ra những apps thú vị và chạy được trên Facebook để thỏa mãn sức sáng tạo vô biên của bạn? Vấn đề là làm nghề Marketing đã đủ mệt và chiếm hết cuộc sống của bạn rồi, tất nhiên là..

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