Skip to content

Instantly share code, notes, and snippets.

View chrishieu's full-sized avatar
🧑‍🚒
keep calm and stay focused

chrishieu

🧑‍🚒
keep calm and stay focused
View GitHub Profile
@chrishieu
chrishieu / gist:a9d21d539ec59051ee34072bcaadd0e4
Created August 2, 2018 01:38 — forked from thachpham92/gist:d57b18cf02e3550acdb5
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ả
- home page
- what we do page
- case stories page
- job story page
<?php
//writed by GoodCom
//author:coolbi
include_once("get_order.php");
$sRange = "0-1023";
$sUserAgent="Gc(2)/v0001";
$useraccount="testuser";
$userpwd="test";
$defaultcount="testuser";
$defaultpwd="test";
{
"success": [
{
"ID": 1,
"guid": "#"
},
{
"ID": 2,
"guid": "#"
},
@chrishieu
chrishieu / err.json
Created April 23, 2018 13:43
asdasd
{"err":{"code":"403","message":"json_parse_error","rawResult":"<!DOCTYPE html>\r\n<html lang=\"vi\" prefix=\"og: http://ogp.me/ns#\" class=\"no-js\">\r\n<head>\r\n\t<meta charset=\"UTF-8\">\r\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n\t<link rel=\"profile\" href=\"https://gmpg.org/xfn/11\">\r\n\t<title>Có gì hay - Xem ngay cho nóng -</title>\n\n<!-- This site is optimized with the Yoast SEO plugin v5.7.1 - https://yoast.com/wordpress/plugins/seo/ -->\n<link rel=\"canonical\" href=\"https://cozihay.com/\" />\n<link rel=\"next\" href=\"https://cozihay.com/page/2/\" />\n<meta property=\"og:locale\" content=\"vi_VN\" />\n<meta property=\"og:type\" content=\"website\" />\n<meta property=\"og:title\" content=\"Có gì hay - Xem ngay cho nóng -\" />\n<meta property=\"og:url\" content=\"https://cozihay.com/\" />\n<meta property=\"og:site_name\" content=\"Có gì hay - Xem ngay cho nóng\" />\n<meta name=\"twitter:card\" content=\"summary\" />\n<meta name=\"twitter:title\" content=\"Có
in /var/www/html/png-staging/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1320 Stack trace:
#0 /var/www/html/png-staging/vendor/sentry/sentry/lib/Raven/Breadcrumbs/ErrorHandler.php(34): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined offse...', '/var/www/html/p...', 1320, Array)
#1 /var/www/html/png-staging/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1320): Raven_Breadcrumbs_ErrorHandler->handleError(8, 'Undefined offse...', '/var/www/html/p...', 1320, Array)
#2 /var/www/html/png-staging/app/Repositories/UserRepository.php(397): Illuminate\Support\Collection->offsetGet(-1)
#3 /var/www/html/png-staging/app/Services/UserService.php(45): App\Repositories\UserRepository->getAffiliates(2)
#4 /var/www/html/png-staging/app/Services/TransactionLendingService.php(71): App\Services\UserService->getAffiliates(2)
#5 /var/www/html/png-staging/vendor/laravel/framework/src/Illuminate/Database/Connection.php(570): App\Serv
<!-- TradingView Widget BEGIN -->
<script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script>
<script type="text/javascript">
new TradingView.widget({
"width": 980,
"height": 400,
"symbol": "NASDAQ:AAPL",
"interval": "D",
"timezone": "Etc/UTC",
"theme": "Light",
INSERT INTO `user` (`username`, `password`, `fullname`, `cell_phone`, `email`, `address`, `gender`, `group_id`)
VALUES
('trucly.pvt@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Đinh Thị Trúc Ly', '01232615623', 'trucly.pvt@gmail.com', 'phan văn trị', 'F', 3),
('lehung.pvt@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Lê thanh hưng', '0942289217', 'lehung.pvt@gmail.com', '', 'M', 3),
('dptruclan@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Trần Thị Thanh Trúc', '0915737894', 'dptruclan@gmail.com', 'Nguyễn Ngọc Thăng', 'F', 3),
('Khuungocthanh10111981@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Khưu Ngọc Thanh', '01273364166', 'Khuungocthanh10111981@gmail.com', '', 'M', 3),
('ngocduyen0506@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Nguyễn Thị Ngọc Duyên', '0907026394', 'ngocduyen0506@gmail.com', '', 'F', 3),
('hauphanpvt@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', 'Phan trung hậu', '', 'hauphanpvt@gmail.com', 'pvt', 'M', 3),
('trinh.thpt.nnt@gmail.com','b5197ac6bb6ccf57c9ad54845e1fcb11', '
@chrishieu
chrishieu / maersk_config.notes
Last active September 26, 2017 09:56
db-config.php, ip_check.json, federation.ini
// ../config/db-config.php
<?php
define('DEVELOPMENT_ENVIRONMENT', 1);
define('DB_NAME', 'maersk_greetings');
if (DEVELOPMENT_ENVIRONMENT == 0) { //localhost
define('BASE_URL', 'http://maersk-card-generator-v2.etypes/');
define('DB_USER', 'root');
define('DB_PASSWORD', 'root');
@chrishieu
chrishieu / product-variants.php
Created June 9, 2017 09:52
Create WooCommerce variations with PHP
<?php
// In a class constructor
$this->size_tax = wc_attribute_taxonomy_name( 'Size' );
$this->color_tax = wc_attribute_taxonomy_name( 'Color' );
// Insert the main product first
// It will be used as a parent for other variations (think of it as a container)
$product_id = wp_insert_post( array(
'post_type' => 'product',
'post_title' => $product_title,
'post_content' => $product_content,