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
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,
{
"success": true,
"data": {
"slideshow": [
{
"style": 1,
"position": 0/1,
"background_image": ["width", "height", "src"],
"title": "input text",
"teaser": "text area",
{
"success": true,
"data": {
"menu": [
{
"name": "Main menu",
"slug": "main-menu",
"item": [
{
"title": "Contact",
{
"success": true,
"data": {
"title": "Center for Protein Reasearch",
"description": "editor text",
"big_letter": "B",
"show_frontpage_slideshow": false,
"initiative_list": [
{
"image": ["src", "width", "height"],
{
"success": true,
"data": {
"title": "Center for Protein Reasearch",
"organization": "Novo Foundation",
"description": "editor text",
"big_letter": "B",
"show_frontpage_slideshow": false,
}
}
{
"success": true,
"data": {
"title": "input text",
"description": "text area",
"content": "editor text",
"show_frontpage_slideshow": false,
"sliders": [
{
"title": "Center for Protein Reasearch",
<?php
$weights = array(
strtolower( 'UltraLight' ) => 100,
strtolower( 'UltraLight Italic' ) => 100,
strtolower( 'Ultra Light' ) => 100,
strtolower( 'Ultra Light Italic' ) => 100,
strtolower( 'Thin' ) => 100,
strtolower( 'ThinItalic' ) => 100,
strtolower( 'Thin Italic' ) => 100,
strtolower( 'ExtraLight' ) => 200,
<?php
/**
* @package php-font-lib
* @link https://github.com/PhenX/php-font-lib
* @author Fabien MÈnager <fabien.menager@gmail.com>
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*/
include 'FontLib/Autoloader.php';
use FontLib\Font;