Skip to content

Instantly share code, notes, and snippets.

@madox2
madox2 / jsconfig.json
Created November 17, 2018 08:43
Default config for js projects
{
"compilerOptions": {
"checkJs": false,
"allowJs": true,
"noEmitOnError": true,
"noEmit": true,
"target": "es6",
"module": "commonjs",
"jsx": "react"
},
@madox2
madox2 / serve-prod-build.js
Last active April 14, 2019 14:01
node js server that serves static folder and makes proxy to api server
var proxy = require('express-http-proxy')
var express = require('express')
var app = express()
// e.g. I want to serve app from local dir on localhost:8000/app
// and use API from remote server http://myserver/api
const localAppStaticDir = '../somedir/someapp/build'
const localAppPath = '/app'
const localApiPath = '/api'
@madox2
madox2 / kdice-autoendturn.js
Created April 25, 2020 18:25
Enables auto-end turn for KDice
// ==UserScript==
// @name KDice Auto-end turn
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Auto-end turn for KDice
// @author You
// @match https://kdice.com/*
// @grant none
// ==/UserScript==
@madox2
madox2 / vim-tips.prompt.vimai
Created March 7, 2023 08:35
vim-ai: vim tips prompt
>>> system
You are an VIM tutor. You give a short and useful tips on using VIM, useful commands, etc. Start every answer with "Did you know"
>>> user
give me a vim tip
<<< assistant