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
/// <reference types="@sveltejs/kit" /> | |
/// <reference no-default-lib="true"/> | |
/// <reference lib="esnext" /> | |
/// <reference lib="webworker" /> | |
// https://kit.svelte.dev/docs/service-workers#type-safety | |
const sw = self as unknown as ServiceWorkerGlobalScope; | |
import { build, files, version } from '$service-worker'; |
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 EventWatch = function(selector, instance, config={}) { | |
this.subscribe = {[selector]: {}} | |
this.selector = selector | |
this.element = document.querySelector(selector) | |
if (!this.element) throw "Element Not found." | |
Object.entries(instance).map(([eventName, eventHandler]) => { | |
const newEventHandler = (e) => { | |
const beforeEvent = new CustomEvent(`${eventName}:before`) | |
const afterEvent = new CustomEvent(`${eventName}:after`) |
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
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
if( $found ){ | |
$remoteport = $matches[0]; | |
} else{ | |
echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
exit; | |
} |
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
FROM golang:alpine as builder | |
WORKDIR /app | |
#the following 2 steps are optional if your image does not already have the certificate | |
# package installed, golang:alpine now seems to have it. But a more base image could be missing it. | |
#RUN apk update && apk upgrade && apk add --no-cache ca-certificates | |
#RUN update-ca-certificates | |
ADD main.go /app/main.go | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" -installsuffix cgo -o app . | |
FROM scratch |