Skip to content

Instantly share code, notes, and snippets.

View lewebsimple's full-sized avatar
🚀

Pascal Martineau lewebsimple

🚀
View GitHub Profile
@lewebsimple
lewebsimple / dropdown-hover.js
Created March 20, 2017 23:53
[Bootstrap 4] Dropdown navbar menu on hover
// Dropdown navbar menu on hover
$('.dropdown-menu', this).css('margin-top', 0);
$('.dropdown').hover(function () {
$('.dropdown-toggle', this).trigger('click').toggleClass("disabled");
});
@lewebsimple
lewebsimple / acf-dynamic-role.php
Created August 10, 2017 15:01
ACF role-based conditions on user new / edit forms
<?php
// Change default role dynamically on role selection change
add_action( 'acf/input/admin_head', 'acf_dynamic_default_role' );
function acf_dynamic_default_role() {
global $pagenow;
if ( $pagenow == 'user-new.php' ) {
?>
<script>
@lewebsimple
lewebsimple / nuxtjs-nestjs.md
Last active January 19, 2024 16:14
NuxtJS / NestJS fullstack development

This is my take on fullstack development using NuxtJS and NestJS.

Development steps

  • Lerna monorepo
  • TypeScript linting and formatting
  • Minimal NestJS server
  • Minimal NuxtJS client
  • Environment configuration
  • TypeGraphQL
  • TypeORM / MySQL
@lewebsimple
lewebsimple / setup-typescript.sh
Last active March 29, 2024 07:42
TypeScript / ESLint / Prettier / Vue 3
#!/bin/bash
yarn add -D @typescript-eslint/eslint-plugin \
typescript ts-node-dev \
@typescript-eslint/parser @typescript-eslint/eslint-plugin eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-vue prettier
cat > .eslintrc.js <<EOF
module.exports = {
root: true,
env: {