Common Tools for development in Mac
- version
xcode-select --version
// xcode-select version 2392.- Install
| /* | |
| * Author : Muhammad Fauzan | fauzan121002 | |
| * Web3.js v1.3.6 | |
| * | |
| * No License Used, Free to modify, commercial use and distribute. | |
| */ | |
| import { defineComponent, useAsync, ref } from '@nuxtjs/composition-api' | |
| export const useGetUserBalance = async () => { |
| /** | |
| * Example `FizzBuzz` with JavaScript (Pattern-Matching Like????????????) λ_(ツ)_/¯ | |
| * I Love this tweet | |
| * @see https://twitter.com/cajuinaoverflow/status/1395022027204005889 | |
| * JavaScript will make You Crazy (Trust Me!) | |
| */ | |
| const FizzBuzz = n => ({ | |
| true: n, | |
| [ n % 5 === 0]: "Buzz", | |
| [ n % 3 === 0]: "Fizz", |
| // define the queue class | |
| class Queue { | |
| constructor(...elements) { | |
| // set array as value of construct args | |
| this.elements = [...elements]; | |
| } | |
| push(...args) { | |
| // push arguments to this.elements | |
| return this.elements.push(...args); |
| /** | |
| * Sets up a DOM MutationObserver that watches for elements using undefined CSS | |
| * class names. Performance should be pretty good, but it's probably best to | |
| * avoid using this in production. | |
| * | |
| * Usage: | |
| * | |
| * import cssCheck from './checkForUndefinedCSSClasses.js' | |
| * | |
| * // Call before DOM renders (e.g. in <HEAD> or prior to React.render()) |
| 'use strict'; | |
| /** | |
| * @callback BeforeShutdownListener | |
| * @param {string} [signalOrEvent] The exit signal or event name received on the process. | |
| */ | |
| /** | |
| * System signals the app will listen to initiate shutdown. | |
| * @const {string[]} |
| function divideAndSort(value){ | |
| const division = value.toString().split("0"); | |
| for(let num in division){ | |
| if(division[num] == "") { | |
| division.splice(num,1); | |
| }else{ | |
| division[num] = division[num].split("").sort().join().replace(/,/g,""); |
| [ | |
| { | |
| "id": "259392830932254721", | |
| "name": "SpeedRunners", | |
| "icon": "cb48279ea90e86fb4f71c709d3236395", | |
| "splash": "94e91cac9509fee1eb80a69b9503878a", | |
| "overlay": false, | |
| "overlayWarn": false, | |
| "overlayCompatibilityHook": false, | |
| "aliases": [], |
| // exemple based on https://github.com/diafygi/webcrypto-examples#rsa-oaep | |
| function importKey() { | |
| return window.crypto.subtle.importKey( | |
| "jwk", //can be "jwk" or "raw" | |
| { //this is an example jwk key, "raw" would be an ArrayBuffer | |
| kty: "oct", | |
| k: "Y0zt37HgOx-BY7SQjYVmrqhPkO44Ii2Jcb9yydUDPfE", | |
| alg: "A256GCM", | |
| ext: true, |