Skip to content

Instantly share code, notes, and snippets.

@nadenf
nadenf / something
Created June 24, 2023 07:10
something
K104877eda2e79c7312c3cc3b585105833133fcd4285c44184cf2fadec167a492d1::server:d4467d69541f5e6496ce5f5538b19796
package utils
import diode.{Circuit, Dispatcher, ModelR}
import slinky.core.facade.Hooks.{useContext, useEffect, useState}
import slinky.core.facade.ReactContext
object DiodeUtils {
def use[M <: AnyRef, T, S <: Circuit[M]](context: ReactContext[S], selector: ModelR[M, T]): (T, Dispatcher) = {
val circuit = useContext(context)
@nadenf
nadenf / gist:55d5109cbfa72cfc3c9f364cdf37c341
Last active February 21, 2022 01:09
Shoelace Input Autofocus
<html>
<head>
<title>Shoelace Input</title>
<style>
@import 'https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.0.0-beta.68/dist/themes/light.css';
body {
font: 16px sans-serif;
background-color: var(--sl-color-neutral-0);
color: var(--sl-color-neutral-900);
@nadenf
nadenf / aws-kubectl Dockerfile
Created August 24, 2021 03:58 — forked from xynova/aws-kubectl Dockerfile
aws-kubectl Dockerfile
FROM mesosphere/aws-cli as PKG
RUN apk --no-cache add openssl \
&& wget -q -O kubectl https://storage.googleapis.com/kubernetes-release/release/v1.7.0/bin/linux/amd64/kubectl \
&& wget -q -O gomplate https://github.com/hairyhenderson/gomplate/releases/download/v2.4.0/gomplate_linux-amd64-slim \
&& chmod +x kubectl gomplate \
&& mv kubectl gomplate /usr/local/bin
ENTRYPOINT ["/bin/sh","-c"]
CMD [""]
Terraform v0.15.3
on linux_amd64
2021-05-18T23:00:34.734Z [DEBUG] Adding temp file log sink: /tmp/terraform-log159739290
2021-05-18T23:00:34.734Z [INFO] Terraform version: 0.15.3
2021-05-18T23:00:34.734Z [INFO] Go runtime version: go1.16.2
2021-05-18T23:00:34.734Z [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply", "-lock=false", "-parallelism=10", "/terraform/terraform.tfplan"}
2021-05-18T23:00:34.734Z [TRACE] Stdout is not a terminal
2021-05-18T23:00:34.734Z [TRACE] Stderr is not a terminal
2021-05-18T23:00:34.734Z [TRACE] Stdin is not a terminal
2021-05-18T23:00:34.734Z [DEBUG] Attempting to open CLI config file: /tmp/cli.tfrc
Terraform v0.15.3
on linux_amd64
Configuring remote state backend...
Initializing Terraform configuration...
2021-05-18T23:00:24.083Z [DEBUG] Adding temp file log sink: /tmp/terraform-log904938806
2021-05-18T23:00:24.083Z [INFO] Terraform version: 0.15.3
2021-05-18T23:00:24.083Z [INFO] Go runtime version: go1.16.2
2021-05-18T23:00:24.084Z [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan", "-out", "/terraform/terraform.tfplan", "-detailed-exitcode", "-var-file=/terraform/01_hashicorp_cloud/terraform.tfvars", "-lock=false", "-parallelism=10"}
2021-05-18T23:00:24.084Z [TRACE] Stdout is not a terminal
2021-05-18T23:00:24.084Z [TRACE] Stderr is not a terminal
Address: 3 Victoria Street, Windsor 3181
Phone: 0422 882 083
{"appsSubmitted": 12, "appsCompleted": 4, "appsPending": 0, "appsRunning": 8, "appsFailed": 0, "appsKilled": 0, "reservedMB": 0, "availableMB": 691712, "allocatedMB": 1609728, "reservedVirtualCores": 0, "availableVirtualCores": 1033, "allocatedVirtualCores": 243, "containersAllocated": 42, "containersReserved": 0, "containersPending": 3, "totalMB": 2301440, "totalVirtualCores": 1276, "totalNodes": 40, "lostNodes": 0, "unhealthyNodes": 0, "decommissioningNodes": 0, "decommissionedNodes": 4, "rebootedNodes": 0, "activeNodes": 36, "shutdownNodes": 0, "@timestamp": "2019-02-19 13:24:11.233", "timestamp": "2019-02-19 13:24:11.233"}
2019-01-07 11:03:42,230 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.15.83 Python/2.7.15 Linux/4.14.77-70.82.amzn1.x86_64 botocore/1.10.82
2019-01-07 11:03:42,230 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'ls', 's3://labs-data-access', '--debug']
2019-01-07 11:03:42,230 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7ffbb02a8668>
2019-01-07 11:03:42,230 - MainThread - botocore.session - DEBUG - Loading variable profile from defaults.
2019-01-07 11:03:42,230 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7ffbaa03e8c0>
2019-01-07 11:03:42,230 - MainThread - botocore.session - DEBUG - Loading variable profile from defaults.
2019-01-07 11:03:42,230 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7ffbaa006de8>
2019-01-07 11:03:42,230
Update OS
cat <<EOT >> /etc/sysctl.conf
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.optmem_max = 40960
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
vm.max_map_count = 1048575