Skip to content

Instantly share code, notes, and snippets.

View vihoangson's full-sized avatar

Vi Hoàng Sơn vihoangson

View GitHub Profile
<?php
/**
* PHPExcel
*
* Copyright (C) 2006 - 2013 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
<?php
/**
* class Get_img_in_content
* @todo: Automatic save image in content
* @author: Vi Hoang Son
* @version: 1 - 2015
*/
class Get_img_in_content
{
var $dir;// direct default
<?php
/**
* paranation
*
* params["page"]
* params["per_page"]
* params["all_row"]
* params["distance"]
* params["link"]

INSTALL COMMON SOFTWARE

  eset
    Lấy key trong server 13 x_04_infrastructure\03_Guide\11_ESET Endpoint Antivirus\02_Upgrade version 10
  chrome
  unikey
  winrar
  phpstorm
 sublime text
• SideBarEnhancements - Extend sidebar
• Alignment - Align code
• AutoFileName - Autocomplete file path
• Autosave
• Bracket Highlighter
• SublimeCodeIntel - Autocomplete
• SublimeLinter - Error highlight
• Can I Use - caniuse website info
• DocBlockr - comment block
• HTML5
<?php
function get_db_csv($file){
if(!$file){
$file = __DIR__.'/include/import.csv';
}
$row = 1;
if (($handle = fopen($file, "r")) !== FALSE) {
$csv = array();
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
if($row==1){
<?php
function test_db(){
$this->db->start_cache();
$this->db->where('id', 1);
$this->db->stop_cache();
$this->db->get('baiviet')->result_array();
echo $this->db->last_query();
echo "<br>";
Mdate="$(date +"%d-%m-%Y | %H:%M:%S")"
mysqldump -u[username_mysql] -p[password_mysql] [db_name] > [/direct_folder_backup/]backup.$Mdate.[db_name].sql
// Here You can type your custom JavaScript...
$("body").click(function(){
if(sessionStorage.getItem("click")==null){
location.href = "http://news.nhacthugian.top";
console.log(sessionStorage.setItem("click","1"));
}
})
$.ajax({
url: '/path/to/file',
type: 'default GET (Other values: POST)',
dataType: 'default: Intelligent Guess (Other values: xml, json, script, or html)',
data: {param1: 'value1'},
beforeSend: function (){
this_s.after(" <img src='img/loading.gif' class='loading_ajax'> ");
}
})
.done(function() {