By resources
sessions
list-sessions ls -- List sessions managed by server
new-session new -- Create a new session
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
import React, { PureComponent } from 'react' | |
import Grid from 'material-ui/Grid' | |
import { CardNumberElement, CardExpiryElement, CardCVCElement } from 'react-stripe-elements' | |
import StripeElementWrapper from './StripeElementWrapper' | |
export default class extends PureComponent { | |
static displayName = 'StripeCardsSection' |
A quick overview of the node.js streams interface with basic examples.
This is based on @brycebaril's presentation, Node.js Streams2 Demystified
Streams are a first-class construct in Node.js for handling data.
Think of them as as lazy evaluation applied to data.
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
'use strict'; | |
var AWS = require('aws-sdk'); | |
var S3 = new AWS.S3(); | |
var readline = require('readline'); | |
exports.handler = function (event, context) { | |
//Get S3 file bucket and name | |
//Make sure to loop through event.Records, don't assume there is only 1 in production!!! | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; |
const stream = require('stream') | |
const readline = require('readline') | |
const AWS = require('aws-sdk') | |
const S3 = new AWS.S3() | |
// read S3 file by line | |
function createReadline(Bucket, Key) { | |
// s3 read stream | |
const input = S3 |
In order of first appearance in The Morning Paper.
package example_test | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"hex" | |
"io" | |
) | |
// AES-GCM should be used because the operation is an authenticated encryption |
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) |