Skip to content

Instantly share code, notes, and snippets.

Mathieu Meylan matinfo

  • Switzerland
Block or report user

Report or block matinfo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matinfo
matinfo / App.vue
Last active Jul 20, 2018
RedactorEditor.vue
View App.vue
import Vue from 'vue'
import VeeValidate from 'vee-validate'
...
import RedactorEditor from './components/RedactorEditor.vue'
Vue.use(VeeValidate)
View vue2-select2.js
Vue.component('select2', {
props: ['options', 'value'],
template: `
<div>
<select multiple ref='select'>
<slot></slot>
</select>
</div>
`,
mounted: function () {
@matinfo
matinfo / encoding-video.md
Created Jan 25, 2018 — forked from Vestride/encoding-video.md
Encoding video for the web
View encoding-video.md

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@matinfo
matinfo / magento_url_rewrite.patch
Created Nov 16, 2017 — forked from edannenberg/magento_url_rewrite.patch
Fixes the catalog url rewrite indexer in Magento 1.7.x-1.9.x See https://github.com/magento/bugathon_march_2013/issues/265 for details.Update: DexterDee in the ticket above noted that the previous patch had some side effects. This updated patch still feels like duct tape but at least it seems to be free of the mentioned side effects. It also fix…
View magento_url_rewrite.patch
diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php
--- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100
+++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100
@@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url
$this->_rewrite = $rewrite;
return $requestPath;
}
+
+ // avoid unnecessary creation of new url_keys for duplicate url keys
+ $noSuffixPath = substr($requestPath, 0, -(strlen($suffix)));
@matinfo
matinfo / gist:96747456aab36ea34c2681433a2f594c
Created Oct 15, 2016
Handel max char left control for input and textarea with angularJS directive
View gist:96747456aab36ea34c2681433a2f594c
// Handel max char left control for input and textarea
/* Set on your project this minumum css style (adapt for your need)
* mandatory for directive *maxlength-control*
*/
/*
.maxlength-control ~ .maxlength-control-status {
color: #b5b5b5;
float: right;
@matinfo
matinfo / app.js
Created Jun 16, 2016 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
View app.js
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
View magento-code-snippets.md

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@matinfo
matinfo / redis_
Last active Sep 11, 2015 — forked from colinmollenhour/redis_
Munin plugin for Redis with added options
View redis_
#!/usr/bin/perl -w
#
## Copyright (C) 2011 Colin Mollenhour <http://colin.mollenhour.com/>
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; version 2 dated June,
## 1991.
##
@matinfo
matinfo / 1_virtualenv_gems_install.env
Last active Aug 29, 2015
Virtualenv Ruby install gems script from requirement_gems.txt
View 1_virtualenv_gems_install.env
# add first to your virtualenv (postactivate or autoenv, etc)
export GEM_HOME="$VIRTUAL_ENV/gems"
export GEM_PATH=""
export PATH=$PATH:"$GEM_HOME/bin"
You can’t perform that action at this time.