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
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: eks-swap-fixer-oneshot | |
| namespace: kube-system | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: eks-swap-fixer-oneshot |
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
| apiVersion: keda.sh/v1alpha1 | |
| kind: ScaledObject | |
| metadata: | |
| name: alb-littles-law-per-second-scaledobject | |
| namespace: default | |
| spec: | |
| scaleTargetRef: | |
| name: my-app-deployment | |
| minReplicaCount: 2 |
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
| CREATE OR REPLACE PROCEDURE create_temp_user(user_id VARCHAR) | |
| LANGUAGE plpgsql | |
| AS $$ | |
| BEGIN | |
| IF NOT EXISTS (SELECT 1 FROM pg_user WHERE usename = user_id) THEN | |
| EXECUTE 'CREATE USER ' || user_id || ' WITH PASSWORD DISABLE'; | |
| EXECUTE 'GRANT SELECT ON ALL TABLES IN SCHEMA public TO ' || user_id; | |
| EXECUTE 'GRANT USAGE ON SCHEMA public TO ' || user_id; | |
| EXECUTE 'ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO ' || user_id; | |
| END IF; |
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 { mqtt5, iot, iotidentity } from 'aws-iot-device-sdk-v2'; | |
| ///Ensure at least once delivery should be enough most of the time | |
| const QOS = mqtt5.QoS.AtLeastOnce; | |
| ///Environment config | |
| const CONFIG = { | |
| endpoint: process.env.IOT_CORE_ENDPOINT!, | |
| cert: process.env.IOT_CORE_CERTIFICATE!, | |
| priv_key: process.env.IOT_CORE_PKEY!, |
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
| [ | |
| { | |
| "type": "error", | |
| "code": "unknown", | |
| "details": "Error extracting glob pattern" | |
| }, | |
| { | |
| "type": "file", | |
| "size": 1501, | |
| "modified": "2023-08-16 10:35:36.158743465 +09:00" |
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
| # Mac OS settings with tmux | |
| [shell] | |
| program = "/opt/homebrew/bin/tmux" | |
| args = [ | |
| "new-session", | |
| "-A", | |
| "-D", | |
| "-s", | |
| "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
| use core::future::Future; | |
| use core::pin::Pin; | |
| use core::task; | |
| use std::io; | |
| ///Future that resolves when program is requested to terminate | |
| #[must_use = "Future does nothing without polling"] | |
| pub struct Termination { | |
| #[cfg(unix)] | |
| term: tokio::signal::unix::Signal, |
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
| # Make sure to create folder /www and grant write access to nginx and yourself | |
| $DOMAIN="your domain" | |
| # Create file structure to serve static file with challenge | |
| sudo mkdir /www | |
| sudo mkdir /www/.well-known/ | |
| sudo mkdir /www/.well-known/acme-challenge | |
| sudo chown nginx /www/.well-known/acme-challenge | |
| #As example grant group write permission (e.g. you want www to belong to nginx user and anyone in nginx group) do: |
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 core::{ptr, task, hint, mem}; | |
| use core::cell::UnsafeCell; | |
| use core::sync::atomic::{AtomicBool, AtomicU8, Ordering}; | |
| mod noop { | |
| use core::{ptr, task}; | |
| const VTABLE: task::RawWakerVTable = task::RawWakerVTable::new(clone, action, action, action); | |
| const WAKER: task::RawWaker = task::RawWaker::new(ptr::null(), &VTABLE); |
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
| # HELP kube_cronjob_annotations Kubernetes annotations converted to Prometheus labels. | |
| # TYPE kube_cronjob_annotations gauge | |
| # HELP kube_cronjob_labels [STABLE] Kubernetes labels converted to Prometheus labels. | |
| # TYPE kube_cronjob_labels gauge | |
| # HELP kube_cronjob_info [STABLE] Info about cronjob. | |
| # TYPE kube_cronjob_info gauge | |
| kube_cronjob_info{namespace="default",cronjob="demo",schedule="* * * * *",concurrency_policy="Forbid"} 1 | |
| # HELP kube_cronjob_created [STABLE] Unix creation timestamp | |
| # TYPE kube_cronjob_created gauge | |
| kube_cronjob_created{namespace="default",cronjob="demo"} 1.707200821e+09 |
NewerOlder