Skip to content

Instantly share code, notes, and snippets.

@prologic
prologic / LearnGoIn5mins.md
Last active July 3, 2024 04:05
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";
@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 July 19, 2024 19:37
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

@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1