Skip to content

Instantly share code, notes, and snippets.

@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
declare module 'tiptap-extensions' {
import { Extension, Node, Mark } from "tiptap";
import { NodeSpec } from "prosemirror-model";
export interface PlaceholderOptions {
emptyNodeClass?: string,
emptyNodeText?: string,
showOnlyWhenEditable?: boolean,
showOnlyCurrent?: boolean,
emptyEditorClass: string
declare module 'tiptap-commands' {
import { EditorView } from "prosemirror-view";
import { Transaction, EditorState, Plugin } from "prosemirror-state";
import { InputRule } from "prosemirror-inputrules";
import { NodeType, MarkType } from "prosemirror-model";
export interface DispatchFn {
(tr: Transaction): boolean
}
declare module 'tiptap' {
import {
MarkSpec,
MarkType,
Node as ProsemirrorNode,
NodeSpec,
NodeType,
ParseOptions,
Schema
} from "prosemirror-model";
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 16, 2025 21:45
set -e, -u, -o, -x pipefail explanation
@JanMalch
JanMalch / Angular - custom structural directives.md
Last active June 9, 2024 16:30
Writing your own structural directives with context variables

Writing your own structural directives with context variables

Complete code in math.directive.ts

After reading this you will be able to create a structural directive with inputs and context variables and use it like this:

<div *math="10; exponent: 3; let input; 
            let exponent = exponent; let r = root;
 let p = power; let ctrl = controller"&gt;
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active March 14, 2025 05:30
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@praveenperera
praveenperera / webpack.config.babel.js
Last active June 13, 2019 06:59
Webpack 2.0 for Phoenix (Elixir) working with sass (scss), Image files, CSS, Font Files and jQuery
import webpack from "webpack";
import ExtractTextPlugin from "extract-text-webpack-plugin";
import CopyWebpackPlugin from "copy-webpack-plugin";
import WebpackNotifierPlugin from "webpack-notifier";
const extractSass = new ExtractTextPlugin({
filename: "css/app.css"
});
export default {
@ajeetraina
ajeetraina / docker-compose.yml
Last active December 19, 2018 22:14
Building JMeter - A Distributed Load Testing Workflow using Docker Compose on Swarm Mode Cluster
#Setting Up Master-Slave JMeter Distributed Load Testing Tool
#
#Pre-requisite:
#
#1- Docker
#2- Docker Compose v3.1 and later
#3- Docker Swarm Mode Running 1 Master(atleast) and N Slave Nodes(worker Nodes)
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm