Skip to content

Instantly share code, notes, and snippets.

View JelteMX's full-sized avatar
👋
Moved to @j3lte, not getting notifications here

Jelte Lagendijk JelteMX

👋
Moved to @j3lte, not getting notifications here
  • Rotterdam, The Netherlands
View GitHub Profile
@JelteMX
JelteMX / rollup.config.js
Created November 24, 2021 14:32
Rollup config to hack my Mendix Pluggable widget tools to play nicely
/*
Hack my rollup so livereload play nicely with my Mac setup (Parallels)
*/
// Change this
const macIP = "10.211.55.2";
// DO NOT CHANGE BELOW
export default args => {
let PORT = 3000;
@JelteMX
JelteMX / rollup.config.js
Last active October 6, 2021 13:49
Rollup config on pluggable-widgets-tools@9.5.4
import { getBabelInputPlugin } from "@rollup/plugin-babel";
import alias from "@rollup/plugin-alias";
export default args => {
const result = args.configDefaultConfig;
const newRes = result.map(config => {
// We're hacking the externals here: React should be an external, react/jsx-runtime (see below) not!
config.external = [/^mendix($|\/)/, /^react$/, /^react-dom($|\/)/, /^big.js$/];
@JelteMX
JelteMX / .env
Created September 16, 2020 06:50
Environment file for pluggable/custom widgets
# Set path to your Mendix project (useful when developing on a Mac while working with Mendix in Parallels)
MX_PROJECT_PATH="/Volumes/[C] Windows 10/Projects/MendixProjects/FileDropperTestProject-main/"
# Skip typings generation when using pluggable widgets tools to build custom widgets
MX_SKIP_TYPEGENERATOR=1
@JelteMX
JelteMX / mendix-cla.md
Last active August 26, 2020 10:05
Mendix CLA

You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Mendix. Except for the license granted herein to Mendix and recipients of software and services distributed by Mendix, You reserve all right, title, and interest in and to Your Contributions.

1. Definitions

1.1 “You” or “Your” means the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Mendix. For legal entities, the entity contributing and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

1.2 “Contribution” means any original work of authorship, includ

@JelteMX
JelteMX / bitbucket-killer.js
Last active June 4, 2020 20:14
Bitbucket Killer
/*
Moved all my repos from Bitbucket to Gitlab, so I needed to delete everything in Bitbucket afterwards
1. Copy this script to an empty npm project (npm init)
2. Install bitbucket js (npm install bitbucket)
3. Create an App password with the rights to admin repositories. See https://bitbucket.org/account/settings/app-passwords/
4. Change the userName and token (app password) in this script
5. Run! Deleted 75 repositories in 3 seconds
6. ???
@JelteMX
JelteMX / command.js
Created May 19, 2020 15:27
Rotrics commands
import { formatPos } from '../../utils/position'
class Command {
constructor(core) {
this.core = core
}
async init() {
await this.core.reset()
}
@JelteMX
JelteMX / xml.json
Last active February 29, 2020 01:41
XML for VSCode when building pluggable widgets
{
"MX Widget Property: attribute": {
"prefix": "propAttr",
"body": [
"<property key=\"$1\" type=\"attribute\" entityProperty=\"$2\" required=\"${3|true,false|}\" isPath=\"${4|no,optional,yes|}\" pathType=\"${5|reference,referenceSet|}\">",
" <caption>$6</caption>",
" <description>$7</description>",
" <attributeTypes>",
" <attributeType name=\"${8|AutoNumber,Binary,Boolean,DateTime,Decimal,Enum,HashString,Integer,Long,String|}\" />",
" </attributeTypes>",
@JelteMX
JelteMX / spaces.json
Created February 12, 2019 13:12
An unminified version of the spaces.json used on docs.mendix.com
[
{
"filename": "apidocs-mxsdk.json",
"content": {
"categories": [
"API Documentation",
"Mendix Platform SDK"
],
"pages": [
{

title: "Enter the title of the document" category: "Enter the category under which the document should be published (for example, "Mobile"); if there is a parent, remove this category line" parent: "Enter the parent document filename of this document if necessary (for example, "design-the-architecture"); if there is a category, remove this parent line" menu_order: Enter the position of the document in the category or under the parent; number by 10 (for first), 20, 30, etc. for easy ordering of other documents in the future if necessary; don't add brackets or quotation marks; if no number is added, the system will add an extremely high number to order the documents, which means that if you only want a document to appear at the top, you only have to add "10" to that specific document, you don't have to order all the other documents in the category/under the parent description: "Set a description with a maximum of 140 characters; this should describe what the goal of the document is, and it can be different

import {
defineWidget,
log,
runCallback,
fetchAttr
} from 'widget-base-helpers';
export default defineWidget('Widget', false, {
attribute: '', // this key is set in your widget XML