Skip to content

Instantly share code, notes, and snippets.

View tuannguyenminh2086's full-sized avatar
🏠
Working from home

Nguyen Minh Tuan tuannguyenminh2086

🏠
Working from home
  • Ho Chi Minh, Vietnam
  • 07:55 (UTC +07:00)
View GitHub Profile
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@ralphcrisostomo
ralphcrisostomo / Wordpress Localhost FTP Connection Information.md
Last active October 26, 2020 14:27
Bypass Wordpress Localhost FTP Connection Information

Bypass Wordpress Localhost FTP Connection Information

Do chown / chmod wordpress folder:

    $ sudo chown -R :_www wordpress
    $ sudo chmod -R g+w wordpress

Add the following line into wp-config.php:

/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@sniperwolf
sniperwolf / ajax.php
Last active December 29, 2022 12:25
Super-Simple WordPress ajax post-popup with jQuery and Reveal plugin
<?php
/**
* Template Name: ajax
*/
?>
<?php
$post = get_post($_GET['id']);
?>
<?php if ($post) : ?>
<?php setup_postdata($post); ?>
@ddbs
ddbs / export.php
Created March 14, 2014 10:15
wordpress: Exporting the results of a custom WPDB query to a downloaded CSV - http://imtheirwebguy.com/exporting-the-results-of-a-custom-wpdb-query-to-a-downloaded-csv/
$wpdb->show_errors();
global $wpdb;
// Grab any post values you sent with your submit function
$DownloadReportFrom = $_POST['ReportDateFrom'];
$DownloadReportTo = $_POST['ReportDateTo'];
// Build your query
@ninjasort
ninjasort / gulpfile.js
Last active September 1, 2019 20:43
Gulp Workflow - Sass, Uglify, Express, Copy, Bourbon, Neat, BrowserSync
var gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
filter = require('gulp-filter'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
bodyParser = require('body-parser'),
express = require('express'),
@ajithrn
ajithrn / add-google-fonts.php
Last active August 18, 2016 22:47
WordPress: Google Fonts
/**
* Manage google fonts of load_google_font()
* set GOOGLE_FONTS constant in config.php
* for roots.io, Sage wp theme, place this code in lib/extras.php
*/
function load_google_fonts() {
if( ! defined( 'GOOGLE_FONTS' ) ) return;
echo '<link href="//fonts.googleapis.com/css?family=' . GOOGLE_FONTS . '" rel="stylesheet" type="text/css" />'."\n";
@nkbt
nkbt / .eslintrc.js
Last active November 6, 2024 13:01
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@thachpham92
thachpham92 / gist:d57b18cf02e3550acdb5
Last active September 6, 2024 08:52
Tất cả các tham số trong WP_Query
// Source: https://gist.github.com/luetkemj/2023628
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz
<?php
$args = array(
//////Author Parameters - Tham số lấy bài viết theo tác giả
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20)
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả
@skyshab
skyshab / default-template.php
Created August 23, 2016 15:42
Custom code I used to integrate The Event Calendar with Divi
<?php
/**
* Custom Events Template
* This file is the basic wrapper template for all the views if 'Default Events Template'
* is selected in Events -> Settings -> Template -> Events Template.
*
* Override this template in your own theme by placing this file at [your-theme]/tribe-events/default-template.php
*
* @package TribeEventsCalendar
*