Skip to content

Instantly share code, notes, and snippets.

@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active June 9, 2024 23:19
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active June 30, 2024 04:14
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@AlcaDesign
AlcaDesign / index.html
Last active November 16, 2023 17:14
[OUTDATED] An almost complete tmi.js example (browser)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Chat</title>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="https://d2g2wobxbkulb1.cloudfront.net/0.0.19/tmi.js"></script> <!--For developement-->
<!--<script src="https://d2g2wobxbkulb1.cloudfront.net/0.0.19/tmi.min.js"></script>--> <!--For "production"-->
</head>
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@F21
F21 / cleanup-docker.md
Last active March 7, 2024 10:05
Commands to clean up docker

Remove dangling images

docker images -qf dangling=true | xargs docker rmi

Remove dangling volumes

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

Intro

May 15th is bringing a network upgrade (also known as a hard fork) to the $BCH network. Along w/ a 32 MB block size we're reactivating a bunch of OP codes. Thanks to the advice of @MADinMelbourne I decided to see exactly what each new OP code was bringing to the table.

Below I list each new OP code w/ a quick description and then demonstrate how it works by showing a small validation script and then what the stack would look like after.

Please let me know if you spot errors. Thanks!

OP_CAT

@beber89
beber89 / actions.go
Created September 16, 2019 22:03
web/actions.go - package web
func RegisterCallbacks() {
js.Global().Set("reward", js.FuncOf(reward))
js.Global().Set("buyCommodity", js.FuncOf(buyCommodity))
js.Global().Set("networth", js.FuncOf(networth))
js.Global().Set("changeUser", js.FuncOf(changeUser))
js.Global().Set("sendSliderValToWasm", js.FuncOf(sendSliderValToWasm))
}
var (
merchant string

Development Environment Setup

This is Gabriel Cardona's AVA Labs-centric development environment setup. Use at your own risk. Your mileage may vary.

Terminal

iTerm2 is a replacement for Terminal

Shell