Edit: This list is now maintained in the rust-anthology repo.
# ---------------------------------------------------------------------------------- | |
# r u s t f m t - C O N F I G | |
# ================================================================================== | |
# | |
# Version: 0.7.1 | |
# Author : Robbepop <robbepop@web.de> | |
# | |
# A predefined .rustfmt.toml file with all configuration options and their | |
# associated description, possible values and default values for use in other | |
# projects. |
'use strict'; | |
// Promisifies readline.question function using node native `util.promisify` | |
// readline.question takes one callback that returns the answer, so it need custom promisifying | |
const readline = require('readline'); | |
const { promisify } = require('util'); | |
readline.Interface.prototype.question[promisify.custom] = function(prompt) { | |
return new Promise(resolve => |
Presigned URLs are useful for fine-grained access control to resources on s3.
For example, if storing larger text blocks than DynamoDB might allow with its 400KB size limits s3 is a useful option.
Ignoring various ACL methods and using presigned URLs, it's possible to create lambda functions that can generate the required upload and download URLs.
Using the default IAM roles and lambda proxy configuration of serverless, lambdas are assigned an IAM role for the application (so that a logical group of functions can share resources - e.g. for a CRUD REST API). Each function then assumes the IAM role via its own function name.
Apply for early acccess.
Start here: https://github.com/openfaas/community-cluster
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration. | |
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js | |
* Also, this example supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
This plugin adds completion for the Kubernetes cluster manager, as well as some aliases for common kubectl commands.
To use it, add kubectl
to the plugins array in your zshrc file:
plugins=(... kubectl)
Note: this feature is available with react-scripts@1.0.0 and higher.
.env
: Default..env.local
: Local overrides. This file is loaded for all environments except test..env.development
,.env.test
,.env.production
: Environment-specific settings..env.development.local
,.env.test.local
,.env.production.local
: Local overrides of environment-specific settings.
use futures::StreamExt; | |
use std::error::Error; | |
use tokio; | |
use tokio::macros::support::Pin; | |
use tokio::prelude::*; | |
use tokio::time::{Duration, Instant}; | |
pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
.threaded_scheduler() |