Skip to content

Instantly share code, notes, and snippets.

View lmeyer's full-sized avatar
🍷
Working full-time for @winesitting

Ludovic Meyer lmeyer

🍷
Working full-time for @winesitting
View GitHub Profile
@hhamon
hhamon / ci.yml
Last active October 1, 2022 15:28
Github Actions PHP CI
name: '[PROJECT NAME]'
'on':
push:
branches:
- master
- develop
- 'releases/**'
pull_request: null
env:
working_directory: ./application
@amanualt
amanualt / ELK.md
Last active May 29, 2023 10:21
Elasticsearch, Logstash, Kibana, Centos 7, Firewalld

Install ELK(Elasticsearch, Logstatsh, and Kibana) on Centos 7

Install java 1.8

  • download and install java
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jre-8u102-linux-x64.rpm"
rpm -Uvh jre-8u102-linux-x64.rpm
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active June 27, 2024 14:45
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@matt-bailey
matt-bailey / customer_account.xml
Last active July 3, 2023 23:10
Disable My Account sidebar links in Magento 2
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Remove unwanted account navigation links -->
anonymous
anonymous / module.xml
Created May 11, 2016 13:49
How to override the 10k product list limit on Magento 2 (changed to 100k)
<?xml version="1.0"?>
<!-- filepath: App/CatalogSearch/etc/module.xml -->
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="App_CatalogSearch" setup_version="1.0.0">
@swissspidy
swissspidy / language-updates-table.php
Last active April 4, 2020 11:20
Display a table with available translation updates on the WordPress update screen
<?php
/**
* Plugin Name: Translation Updates Table
*
* @author Pascal Birchler <pascal@required.ch>
* @license GPL2+
*/
/**
* Displays a table with available translation updates.
@pavelthq
pavelthq / custom_view.js
Last active March 27, 2024 14:51
Visual Composer: Custom markup element example
(function($) {
window.VcCustomElementView = vc.shortcode_view.extend( {
elementTemplate: false,
$wrapper: false,
changeShortcodeParams: function ( model ) {
var params;
window.VcCustomElementView.__super__.changeShortcodeParams.call( this, model );
params = _.extend( {}, model.get( 'params' ) );
if ( ! this.elementTemplate ) {
<?php
/**
* Get all type posts
*
* @return void
* @author alispx
**/
function alispx_get_type_posts_data( $post_type = 'post' ) {
@seangreen
seangreen / mage-dbdump-sales-users
Last active December 28, 2018 19:21
Shell Script to Dump / Import Magento Sales and Customers
#!/bin/bash
# VARIABLES
CONFIG_FILE="./app/etc/local.xml"
DUMP_FILE="./var/db-sales-users.sql"
TABLES="sales_bestsellers_aggregated_daily sales_bestsellers_aggregated_monthly sales_bestsellers_aggregated_yearly sales_billing_agreement sales_billing_agreement_order sales_flat_creditmemo sales_flat_creditmemo_comment sales_flat_creditmemo_grid sales_flat_creditmemo_item sales_flat_invoice sales_flat_invoice_comment sales_flat_invoice_grid sales_flat_invoice_item sales_flat_order sales_flat_order_address sales_flat_order_grid sales_flat_order_item sales_flat_order_payment sales_flat_order_status_history sales_flat_quote sales_flat_quote_address_item sales_flat_quote_item sales_flat_quote_item_option sales_flat_quote_payment sales_flat_quote_shipping_rate
sales_flat_shipment sales_flat_shipment_comment sales_flat_shipment_grid sales_flat_shipment_item sales_flat_shipment_track sales_invoiced_aggregated sales_invoiced_aggregated_order sales_order_aggregated_created sales_order_aggregated_updated sales_order_statu
var cushion = .5;
var length = 50;
var dx = point.x - mouse.x;
var dy = point.y - mouse.y;
var da = Math.sqrt(dx * dx + dy * dy);
// Tend à ramener la distance entre les segments à length
var ox = dx / da * length - dx;
var oy = dy / da * length - dy;