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
@lmeyer
lmeyer / base
Last active November 15, 2023 12:46
Boxstarter
#######################
# Windows Configuration
Update-ExecutionPolicy Unrestricted
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-BingSearch
Enable-RemoteDesktop
Enable-MicrosoftUpdate
@lmeyer
lmeyer / gist:4128538
Created November 21, 2012 23:31
Mouse click and hold event
var intervalId;
var i = 0;
$("#element").mousedown(function(e) {
intervalId = setInterval(function(){
console.log(i++);
}, 10);
}).mouseup(function() {
clearInterval(intervalId);
i = 0;
});
@lmeyer
lmeyer / instructions.md
Last active January 9, 2023 10:40
PHPStorm config

Go to File > Settings

Build, Execution, Deployement > Docker > New Docker Windows

PHP > Add interpreter > New > Docker compose > php
PHP > Quality Tools > PHP CS Fixer > New > Choose php > vendor/bin/php-cs-fixer (inspection checked + risky rules checked + Custom ruleset)
PHP > Quality Tools > Psalm > New > Choose php > vendor/bin/psalm
Languages and frameworks > Node.js > Node interpreter : Ubuntu
Languages and frameworks > Javascript > Code quality tools > ESLint > automatic ESLint config + run for files {**/*,*}.{js,ts,jsx,tsx,html,vue} + Run fix on save
Languages and frameworks > Style sheets > StyleLint > Choose stylelint in WSL + run for files {**/*,*}.{css,scss}

@lmeyer
lmeyer / main.scss
Created October 25, 2016 10:22
Responsive margins and paddings sass mixin
// Sizes
$margin-none: 0;
$margin-sm: 5;
$margin-base: 15;
$margin-lg: 30;
$margin-xl: 50;
$margin-xxl: 100;
$padding-xxl: 100;
@lmeyer
lmeyer / utils.php
Created April 9, 2019 14:28
VC Autocomplete with multiple ajax sources
<?php
add_filter( 'vc_autocomplete_hdco_featured_featureds_callback', 'get_hdco_autocomplete_featureds', 10, 1 );
function get_hdco_autocomplete_featureds($query) {
$query = sanitize_text_field($query);
$items_array = [];
$args = array(
"post_type" => "post",
"s" => $query
@lmeyer
lmeyer / gist:f506a67462bf7614877a205db431bd55
Created October 13, 2016 16:21
Make WP Super Cache works with Bedrock
define( 'WP_CACHE', true );
define( 'WPCACHEHOME', $webroot_dir . '/app/plugins/wp-super-cache/');
@lmeyer
lmeyer / docker-compose.yml
Created January 24, 2022 15:18
Traefik config
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.5
restart: always
ports:
# The HTTP port
- "80:80"
@lmeyer
lmeyer / gist:b7a959542f17152efcb8
Created May 23, 2014 13:19
Build propel model when propel-gen throw phing.php : permission denied
php vendor/propel/propel1/generator/bin/phing.php -f "vendor/propel/propel1/generator/build.xml" -Dproject.dir=app/config/propel main
@lmeyer
lmeyer / gist:098a612424d5114cb3ab
Created November 30, 2015 11:41
Login when "this account is not available"
su -l apache -s /bin/bash
background: linear-gradient(45deg,#f5a04b,#d82873);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;