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
//@version=2 | |
// author: Milad Doorbash | |
strategy("Bitfinex Greed Level + RSI Strategy") | |
sym = input(title="Symbol", defval="BTCUSD", type=string) | |
greedChange = input(0.4, title="Greed Change") | |
greedLength = input(100, title="Greed SMA Length") | |
rsiHigh = input(70, title="RSI High") | |
rsiLow = input(30, title="RSI Low") |
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
//@version=4 | |
study("Weighted SMA") | |
weighted_sma(price, length) => | |
totalWeight = log(length) | |
totalMA = log(length) * price | |
for i = 1 to length-1 | |
totalWeight := totalWeight + log(length - i) | |
currentMA = log(length - i) * sma(price, i) | |
totalMA := totalMA + currentMA | |
totalMA / totalWeight |
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
package io.colyseus.example.java; | |
import io.colyseus.Client; | |
import io.colyseus.Room; | |
import kotlin.Unit; | |
import kotlin.coroutines.Continuation; | |
import kotlin.coroutines.CoroutineContext; | |
import org.jetbrains.annotations.NotNull; | |
public class 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
import kotlin.reflect.jvm.jvmErasure | |
import kotlin.reflect.typeOf | |
class Y | |
class X<T> | |
@OptIn(ExperimentalStdlibApi::class) | |
inline fun <reified T> T.getGenericType(): Class<Any>? = typeOf<T>().arguments[0].type?.jvmErasure?.java as Class<Any>? |
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 { Client } from "."; | |
const client = new Client("ws://localhost:2560"); | |
(async () => { | |
try { | |
const room = await client.joinOrCreate<any>("ffa"); | |
console.log("joined successfully", room.sessionId); |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"time" | |
"github.com/dghubble/go-twitter/twitter" | |
"github.com/dghubble/oauth1" | |
) |
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
package main | |
import ( | |
"bytes" | |
"errors" | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"os/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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os/exec" | |
) | |
func metrics(w http.ResponseWriter, req *http.Request) { |
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
targets: | |
- google.com | |
dns: | |
refresh: 2m15s | |
nameserver: 1.1.1.1 | |
ping: | |
interval: 10s | |
timeout: 3s |
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
global: | |
resolve_timeout: 5m | |
route: | |
group_by: ['alertname'] | |
group_wait: 30s | |
group_interval: 10m | |
repeat_interval: 4h | |
receiver: 'web.hook' | |
receivers: |