Skip to content

Instantly share code, notes, and snippets.

View kevinzie's full-sized avatar
:shipit:
Working on it!

Kevinzie kevinzie

:shipit:
Working on it!
View GitHub Profile
<?php
$options = array(
"user_email" => $userEmail,
"path" => $visitedPath,
"action_name" => $actionName,
"store_id" => $webStore,
"remote_ip" => $remoteIp,
"created_at" => $date
);
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$loggerModel = $objectManager->create('Vodex\Logger\Model\Logger');
$loggerModel->setData($options);
$loggerModel->save();
<?php
$options = array(
"user_email" => $userEmail,
"path" => $visitedPath,
"action_name" => $actionName,
"store_id" => $webStore,
"remote_ip" => $remoteIp,
"created_at" => $date
);
<?php
namespace Vodex\Logger\Observer;
/**
* @category Logger
* @package Vodex_Logger
* @author [email protected]
* @website https://vodex.co.id
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
[
{
"title":"Live TV ABC",
"drawable":"",
"submenu":"",
"iap":false,
"tabs":[
{
"title":"Live TV ABC",
"provider":"stream",
<!DOCTYPE html>
<html>
<head>
<title>Google Maps JavaScript API v3 Example: Map Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map_canvas {
margin: 0;
@kevinzie
kevinzie / Magento 2 - Check isHome()
Created August 2, 2018 04:04
Magento 2 Http Request Detection.
<?php
namespace Jackrose\Catalog\Block\Product;
class TrendingProduct extends \Magento\Framework\View\Element\Template
{
...
protected $_request;
...
public function __construct(
...
@kevinzie
kevinzie / Dockerfile
Created August 14, 2018 04:47
Dockerfile for Magento 2 with Ubuntu 16.04
# Pull base Image​
FROM ubuntu:16.04
# Change default shell to bash
SHELL ["/bin/bash","-c"]
# Prepare and Install the required package​
RUN apt-get update && apt-get install -y curl git unzip php apache2 libapache2-mod-php php-{mysql,json,mbstring,curl,mcrypt,gd,bcmath,intl,soap,xml,xdebug,zip} locales \
&& rm -rf /var/lib/apt/lists/* \
​&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8​
@kevinzie
kevinzie / Docker Run
Created August 14, 2018 04:49
Docker Run
docker run -dit -p 80:80 --mount type=bind,source="$(pwd)/src",target="/var/www/domain.com/public_html" IMAGE_NAME:latest
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.