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
// @version=5 | |
indicator(title="Multi-MA", shorttitle="MA", overlay=true) | |
var string MA_EMA = "EMA" // (Exponential Moving Average)" | |
var string MA_SMA = "SMA" // (Simple Moving Average)" | |
var string MA_WMA = "WMA" // (Weighted Moving Average)" | |
var string MA_HMA = "HMA" // (Hull Moving Average)" | |
var string MA_RMA = "RMA" // (Relative Moving Average)" | |
var string MA_SWMA = "SWMA" // (Symmetrically-Weighted Moving Average)" |
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
/** | |
* Arduino Sketch for Digital Calipers and Dial Indicators Reading | |
* | |
* This sketch is designed to interface with digital calipers or dial indicators, reading measurements | |
* via a simple two-pin setup. It effectively handles data on both rising and falling edges of a clock signal, | |
* managing debouncing and differentiating between measurement units (inches or millimeters). | |
* | |
* Features: | |
* - Uses interrupts to capture data from clock signal changes. | |
* - Debouncing logic for accurate edge detection. |
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
// ==UserScript== | |
// @name ChatGPT Speak and Listen | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author https://gist.github.com/kesor | |
// @downloadURL https://gist.github.com/kesor/fc0d1a9b285011b74670109f22a59670 | |
// @match https://chat.openai.com/chat | |
// @grant unsafeWindow | |
// ==/UserScript== |
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
// paste this into your chrome dev console for Speech Synthesis | |
const originalFetch = window.fetch | |
const patchedFetch = (...args) => { | |
if (args[1].method == 'POST' && args[1].body.length > 0 && /moderations$/.test(args[0])) { | |
const aiResponse = JSON.parse(args[1].body)["input"].split("\n\n\n") | |
if (aiResponse.length > 1) { | |
const text = aiResponse.slice(1).join(". ").trim() | |
console.log(text) |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name seafile.example.com; | |
root /usr/local/www/nginx; | |
error_page 500 502 503 504 /50x.html; | |
location = 50x.html { | |
root /usr/local/www/nginx-dist; | |
} |
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 | |
set -euxo pipefail | |
export CALICO_VERSION="${CALICO_VERSION:-3.13.4}" | |
export CNI_VERSION="${CNI_VERSION:-0.8.7}" | |
export CONTAINERD_VERSION="${CONTAINERD_VERSION:-1.4.3}" | |
export DOCKER_VERSION="${DOCKER_VERSION:-20.10.0}" | |
export FILEBEAT_VERSION="${FILEBEAT_VERSION:-7.5.1}" | |
export FLANNEL_VERSION="${KUBERNETES_VERSION:-0.11.0}" |
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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "Plot showing a 30 day rolling average with raw values in the background.", | |
"width": 800, | |
"height": 600, | |
"data": {"url": "data/seattle-weather.csv"}, | |
"transform": [{ | |
"window": [ | |
{ | |
"field": "temp_max", |
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 get_cluster_name() { | |
if ! kubectl config current-context ; then | |
echo "ERROR: Could not read kubeconfig context" 2>&1 | |
exit 1 | |
fi | |
} | |
CLUSTER_NAME=$(get_cluster_name) |
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
filebeat.autodiscover: | |
providers: | |
# documented at https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover.html | |
- type: kubernetes | |
host: ${NODE_NAME} | |
hints.enabled: true | |
hints.default_config: | |
type: container | |
paths: | |
- /var/log/containers/*${data.kubernetes.container.id}.log |
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
I0901 15:06:00.194412 65709 factory.go:68] state store s3://mybucket.domain.com/mycluster | |
I0901 15:06:00.194584 65709 s3context.go:337] GOOS="darwin", assuming not running on EC2 | |
I0901 15:06:00.194592 65709 s3context.go:170] defaulting region to "us-east-1" | |
I0901 15:06:00.987020 65709 s3context.go:210] found bucket in region "us-east-1" | |
I0901 15:06:00.987048 65709 s3fs.go:284] Reading file "s3://mybucket.domain.com/mycluster/mycluster.domain.com/config" | |
I0901 15:06:01.770731 65709 s3fs.go:321] Listing objects in S3 bucket "mybucket.domain.com" with prefix "mycluster/mycluster.domain.com/instancegroup/" | |
I0901 15:06:01.978948 65709 s3fs.go:349] Listed files in s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup: [s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/master-us-east-1a s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/nodes s3://mybucket.domain.com/mycluster/mycluster.domain.com/instancegroup/second] | |
I0901 15:06:01.978996 65709 |