Skip to content

Instantly share code, notes, and snippets.

pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : {{Token Symbol}}
// Name : {{Token Name}}
// Total supply : {{Total Supply}}
// Decimals : {{Decimals}}
// Owner Account : {{Owner Account}}
@martenc
martenc / stack.js
Created April 30, 2021 15:39 — forked from bradtraversy/stack.js
Stack data structure
class Stack {
constructor() {
this.items = []
this.count = 0
}
// Add element to top of stack
push(element) {
this.items[this.count] = element
console.log(`${element} added to ${this.count}`)
@martenc
martenc / README.md
Last active July 7, 2021 16:03 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery (Vanilla)

Events

// jQuery
$(document).ready(function() {
  // code
})
@martenc
martenc / Makefile
Created February 25, 2021 18:31 — forked from thomaspoignant/Makefile
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@martenc
martenc / sass-7-1-pattern.scss
Created August 4, 2019 18:06 — forked from rveitch/sass-7-1-pattern.scss
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@martenc
martenc / example.raml
Last active April 17, 2019 18:27
API status - bare minimum endpoints
#%RAML 1.0
title: example
version: 1.0
baseUri: https://api.whatever.com/system/{version}
/{id}:
get:
description:
responses:
200:
@martenc
martenc / docker-compose.yml
Created April 4, 2019 21:12
example definitions for mult-containers
version: '3.4'
services:
webmvc:
image: eshop/web
environment:
- CatalogUrl=http://catalog.api
- OrderingUrl=http://ordering.api
ports:
@martenc
martenc / docker-compose.yml
Created April 3, 2019 23:27
asp.net core + postgres
version: '2'
services:
web:
container_name: 'aspnetcoreapp'
image: 'aspnetcoreapp'
build:
context: .
dockerfile: aspnetcore.development.dockerfile
@martenc
martenc / import-to-firestore.js
Last active September 24, 2022 07:30
import CSV or JSON to firebase cloud firestore
// https://stackoverflow.com/questions/46640981/how-to-import-csv-or-json-to-firebase-cloud-firestore
const admin = require('../functions/node_modules/firebase-admin');
const serviceAccount = require("./service-key.json");
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://<your-database-name>.firebaseio.com"
});