Skip to content

Instantly share code, notes, and snippets.

View gist:4cdb628c84a60653e921a8a4a6b81297
var url = document.querySelector("html>body>script").text.match(/https:\/\/vod-progressive.akamaized.net[\S]+?\.mp4[\S]+?\.mp4+/g)[0];
window.open(url);
@julienanquetil
julienanquetil / Magento_composer.json
Created Feb 18, 2019
composer add custom module to magento2
View Magento_composer.json
{
"name": "magento/magento2ce",
"description": "Magento 2 My project",
"type": "project",
"version": "2.2.7",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
View csv1.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
sku;col1;col2;test
123;456;99;A
234;786;99;
345;678;99;A
View gist:7591c7a657ab33b1abf72c542cb14c1d
<?php
$adminUrl='http://magento2.dev/rest/V1/integration/admin/token';
$ch = curl_init();
$data = array("username" => "admin", "password" => "admin123");
$data_string = json_encode($data);
$ch = curl_init($adminUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@julienanquetil
julienanquetil / gist:00f6e5947cde8f96dcf0557f562b7529
Created Sep 5, 2017
PIMGento-2/Product/Model/Factory/Import.php
View gist:00f6e5947cde8f96dcf0557f562b7529
<?php
namespace Pimgento\Product\Model\Factory;
use \Pimgento\Import\Model\Factory;
use \Pimgento\Entities\Model\Entities;
use \Pimgento\Import\Helper\Config as helperConfig;
use \Pimgento\Import\Helper\UrlRewrite as urlRewriteHelper;
use \Pimgento\Product\Helper\Config as productHelper;
use \Pimgento\Product\Helper\Media as mediaHelper;
View index.php
<?php
$name = filter_input(INPUT_GET, 'name', FILTER_SANITIZE_STRING);
$title = filter_input(INPUT_GET, 'title', FILTER_SANITIZE_STRING);
echo $name;
if (!$title || $title ==''){
$title = 'Voici Un Putain de Titre Super Vendeur !';
}
echo $title;
View config.json
{
"vars": {
"@gray-base": "#555555",
"@gray-darker": "#222222",
"@gray-dark": "#333333",
"@gray": "#555555",
"@gray-light": "#eeeeee",
"@gray-lighter": "#999999",
"@brand-primary": "#9db326",
"@brand-success": "#0062ac",
You can’t perform that action at this time.