This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
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 ( | |
| "context" | |
| "crypto/tls" | |
| "encoding/json" | |
| "fmt" | |
| "math/rand" | |
| "time" |
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 ( | |
| "log" | |
| "net/http" | |
| "net/url" | |
| "github.com/gin-gonic/gin" | |
| "github.com/google/uuid" |
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
| func GetPayToAddrScript(address string) []byte { | |
| rcvAddress, _ := btcutil.DecodeAddress(address, &chaincfg.TestNet3Params) | |
| rcvScript, _ := txscript.PayToAddrScript(rcvAddress) | |
| return rcvScript | |
| } | |
| type TXRef struct{ | |
| TXHash string | |
| TXOutputN int | |
| } |
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" | |
| "unsafe" | |
| ) | |
| func main(){ | |
| // integer for convert | |
| num := int64(1354321354812) |
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 java.io.OutputStream | |
| import java.net.Socket | |
| import java.nio.charset.Charset | |
| import java.util.* | |
| import kotlin.concurrent.thread | |
| fun main(args: Array<String>) { | |
| val address = "localhost" | |
| val port = 9999 |
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
| extern crate lambda_runtime as lambda; | |
| extern crate alexa_sdk; | |
| use lambda::{lambda, Context, error::HandlerError}; | |
| use alexa_sdk::{Request,Response}; | |
| use alexa_sdk::request::{IntentType, Locale}; | |
| use std::error::Error; | |
| fn handle_help(_req: &Request) -> Result<Response,HandlerError> { | |
| Ok(Response::new_simple("hello", "to say hello, tell me: say hello to someone")) |
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
| val file = File(filePath) | |
| val fileOutputStream = FileOutputStream(file) | |
| val inputStream = BufferedInputStream(URL(url).openStream()) | |
| var downloadSize = 0 | |
| val buffer = ByteArray(bufferSize) | |
| var bufferLength: Int | |
| while (true) { |
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 dk.im2b | |
| import java.io.OutputStream | |
| import java.net.ServerSocket | |
| import java.net.Socket | |
| import java.nio.charset.Charset | |
| import java.util.* | |
| import kotlin.concurrent.thread | |
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
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "[email protected]:"] | |
| insteadOf = git://github |
NewerOlder