This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: GPL-3.0 | |
| pragma solidity >=0.7.0 <0.9.0; | |
| contract PriceIncrease { | |
| // @dev starting the pricelist tier from 0 index | |
| int public priceTier = 0; | |
| uint256 public totalPurchased = 0; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const accessibilityUtils = { | |
| /** | |
| * string list of selectors that are valid types that can be focused on. | |
| * Used in querySelectorAll to create a NodeList of child elements within | |
| * intended element to trap focus (the parent) | |
| */ | |
| focusableElements: 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', | |
| /** | |
| * Local context for mounting Nodes to be referenced when the handler is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin font-family($name) { | |
| @font-face { | |
| font-family: #{$name}; | |
| src:url("./Fonts/#{$name}.otf"); | |
| src:url("/Static/Core/Fonts/#{$name}.eot"); | |
| src:url("/Static/Core/Fonts/#{$name}.eot?#iefix") format("embedded-opentype"), | |
| url("/Static/Core/Fonts/#{$name}.woff") format("woff"), | |
| url("/Static/Core/Fonts/#{$name}.ttf") format("truetype"); | |
| font-weight: normal; //optionally add in the default font styles | |
| font-style: normal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {exampleModue} from '../modules/exampleModue'; | |
| const modules = { | |
| exampleModue: exampleModue | |
| }; | |
| function loadModules() { | |
| const moduleNodes = document.querySelectorAll('[data-component]'); | |
| console.log('Loading', modules); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Assumes a directory structure like the following. | |
| // ├── app.go | |
| // └── src | |
| // ├── css | |
| // │ └── global.css | |
| // ├── index.html | |
| // └── js | |
| package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| current_dir = $(shell pwd) | |
| IMAGE = hagata/basic-box | |
| CONTAINER = -any-container-name | |
| VOLUMES ?= -v $(current_dir)/:/app | |
| # RUN_PORTS = -p 8080:8080 \ | |
| # -p 8000:8000 | |
| #pull the latest image, and start a container. | |
| start: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Utility functions for common dom operations. | |
| */ | |
| const dom = { | |
| /** | |
| * Gets closest ancestor element with matching class. | |
| * ref: http://stackoverflow.com/questions/22119673/find-the-closest-ancestor-element-that-has-a-specific-class | |
| * | |
| * @param {Node} el Root note to begin search. | |
| * @param {String} cls Class to match. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PubSub { | |
| constructor(params) { | |
| this.subscriptions_ = {}; | |
| } | |
| /** | |
| * Publishes a Topic. If the topic exists in the PubSub subscriptions, the | |
| * corresponding function will be invoked | |
| * | |
| * @param {String} topic Topic to publish. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| /** | |
| * Testing multiple promises for Promise.all([…]).then callback | |
| */ | |
| class Prom { | |
| constructor(name) { | |
| this.name = name; | |
| this.promises = []; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias dk="docker" | |
| # Start up docker Daemon shortcut | |
| docker-env(){ | |
| eval $(docker-machine env $1) | |
| } |
NewerOlder