Apply for early acccess.
Start here: https://github.com/openfaas/community-cluster
Apply for early acccess.
Start here: https://github.com/openfaas/community-cluster
public string hash(string pwd,string salt) { | |
Rfc2898DeriveBytes pdb; | |
Byte[] byteValue = System.Text.Encoding.UTF8.GetBytes(salt); | |
pdb = new Rfc2898DeriveBytes(pwd, byteValue, 1333); | |
return Convert.ToBase64String(pdb.GetBytes(32)); | |
} |
package utils | |
import groovy.json.JsonBuilder | |
import groovy.json.JsonSlurper | |
class HDD { | |
static save(Object content, String filePath) { | |
new File(filePath).write(new JsonBuilder(content).toPrettyString()) | |
} |
'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 => |
User sessions in J2EE and LAMP stacks have traditionally been handled in memory by the application server handling the user request. Because of that, load balancers have been configured to use sticky sessions. By sticky sessions we mean that once the user has visited the site, they will be assigned an app server and will return to that server for subsequent requests. The load balancers typically handle that by referencing the users session cookie.
Elastic cloud environments differ from traditional server configurations in that they have a variable number of servers based on traffic loads whereas traditional configurations had a fixed number of servers. When traffic volumes decline it is necessary to vaporize servers. In doing so, we would lose user sessions (essentially forcing a logout) unless we come up with a new strategy for session management.
After much research, it is clear that the best
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.
# Replace REMOTE_NAME with your remote name (e.g. origin) | |
git branch -r | grep REMOTE_NAME/ | grep -v 'master$' | grep -v HEAD| cut -d/ -f2 | while read line; do git push REMOTE_NAME :$line; done; |
At the end of your Blogger post , using HTML editor, append this | |
<script src="https://raw.github.com/moski/gist-Blogger/master/public/gistLoader.js" type="text/javascript"></script> | |
In the content of your blog post, simply add this: | |
<div class="gistLoad" data-id="8488564" id="gist-8488564">Loading https://gist.github.com/8488564....</div> | |
Note: adding the URL is useful because when the javascript does not work, readers can copy and paste the URL themselves. |
/* 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 }); |
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.