Skip to content

Instantly share code, notes, and snippets.

View joaomnb's full-sized avatar

João Bernardino joaomnb

  • Porto, Portugal
View GitHub Profile
@joaomnb
joaomnb / vue-slot-syntax-refactoring-script.py
Created February 24, 2024 23:53
Vue slot syntax refactoring script
# This script can be used to automatically refactor all *.vue files in a project
# according to the slot syntax changes introduced in 2.6. From Vue 3, the old syntax
# is no longer supported, so this is essential when upgrading a project from Vue 2 to Vue 3.
#
# Unfortunately, the changes are too complex to automate with a "find & replace" strategy.
# This Python script leverages an HTML parser (Beautiful Soup) to process all Vue files in
# a project, in bulk.
#
# While using the HTML Parser introduces some undesired changes to the Vue files (since the Vue
# syntax is not exactly the same as HTML 5), this script circumvents that, making sure only the
@joaomnb
joaomnb / webpack.mix.js
Created July 26, 2019 14:08 — forked from kellymears/webpack.mix.js
[Gutenberg Webpack Mix] #gutenberg #mix #js
const mix = require('laravel-mix');
const url = 'http://lab.tinypixel.test';
const app = './src';
const config = './config';
const resources = './resources';
const assets = './resources/assets';
const dist = './dist';
const externals = {
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@joaomnb
joaomnb / gulpfile.js
Created December 23, 2017 02:56
[[Gulp] Less + LiveReload] A gulpfile.js for compiling Less files and reloading the browser using LiveReload #tools
var gulp = require('gulp')
var less = require('gulp-less')
var reload = require('gulp-livereload')
var config = {
less: {
src: 'public/stylesheets/style.less',
dest : 'public/stylesheets'
},
watch: {
@joaomnb
joaomnb / cloudSettings
Last active February 1, 2019 03:12
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-01T03:12:19.954Z","extensionVersion":"v3.2.4"}

Keybase proof

I hereby claim:

  • I am joaomnb on github.
  • I am joaomnb (https://keybase.io/joaomnb) on keybase.
  • I have a public key ASA-Zvg5zrhKkw5Zdp4kP_OcLileAgDX8DZNgl1Nl8IS5Qo

To claim this, I am signing this object: