For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains 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
function wasm_sync -d "Compile wasm from platform, and cody to findora-wallet-wasm " | |
set original_directory $PWD | |
set -l findoraDir "$OLEKS_ROOT/prj/Findora" | |
set -l wasmComponentDir "$findoraDir/platform/src/components/wasm" | |
set -l sourceDir "$wasmComponentDir/pkg" | |
set -l wasmTargetRootDir "$findoraDir/findora-wallet-wasm" | |
echo |
This file contains 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
// ECMAScript 6 sets: union, intersection, difference | |
// 1 union | |
let a = new Set([1,2,3]); | |
let b = new Set([4,3,2]); | |
let union = new Set([...a, ...b]); // {1,2,3,4} | |
// 2 intersection | |
let a = new Set([1,2,3]); | |
let b = new Set([4,3,2]); |
This file contains 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
// In JavaScript we can create custom events, and the way it works changes in the | |
// browser and in Node.js. | |
// In the frontend we use the Event object which is provided by the browser: | |
const anEvent = new Event('start'); | |
// You can trigger the event using | |
document.dispatchEvent(anEvent) |
This file contains 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 OutOfFuelError extends Error { | |
constructor(message) { | |
super(message) | |
this.name = "OutOfFuelError" | |
} | |
} | |
class FlatTireError extends Error {} | |
try { |
This file contains 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
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
This file contains 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 shuffle = arr => arr.sort(() => Math.random() - 0.5) | |
const data = [1, 2, 3, 4, 5, 6, 7, 8, 9] | |
console.log('Data 1', data) | |
console.log('Data 2', shuffle(data)) | |
console.log('Data 3', shuffle(data)) | |
console.log('Data 4', shuffle(data)) | |
console.log('Data 5', shuffle(data)) |
This file contains 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
{ | |
"scripts": [], | |
"showConsole": true, | |
"scriptType": "module" | |
} |
This file contains 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
// | |
// Logging objects | |
// | |
// Don't use | |
console.log(obj); | |
//use | |
console.log(JSON.parse(JSON.stringify(obj))); |
NewerOlder