Skip to content

Instantly share code, notes, and snippets.

@jennevdmeer
jennevdmeer / AutoSizeTextArea.ts
Last active July 28, 2022 09:13
Little standalone TypeScript file to help with auto-sizing HTML text areas while typing.
View AutoSizeTextArea.ts
export interface AutoSizeTextAreaOptions {
observe?: string[];
loadExistingTextAreas?: boolean;
textAreaSelector?: string;
minLines?: number;
minHeight?: number;
maxLines?: number;
maxHeight?: number;
}
View symfony-commands.md

List of loaded bundles (with format json or the lines will be truncated):

php bin/console debug:container --parameter=kernel.bundles --format=json
@jennevdmeer
jennevdmeer / Component.vue
Last active July 5, 2019 11:52
Vue self removing initializer with external props
View Component.vue
<template>
<div>
{{ foo }}
{{ helloWorld }}
</div>
</template>
<script>
export default {
name: 'entry-component',
@jennevdmeer
jennevdmeer / 1 PromiseButton.md
Last active May 8, 2019 14:53
vue promise button
View 1 PromiseButton.md

promise is the promise object, this property is being watched so will reset on change. And default to default if none is provided.

reset on 0 wont reset the button's finaly state, however when a number is entered it will reset to 'default' after said timeout is finished.

disable can be used to disabled the button (button also disables itself while loading, so need to do