Skip to content

Instantly share code, notes, and snippets.

View example.js
import { mapLimit, auto, constant } from 'async'
import request from 'request'
import analyzer from './analyze'
import logger from './log'
const data = [
'http://example.com/item/0'
'http://example.com/item/1'
'http://example.com/item/2'
'http://example.com/item/3'
View cloudformation-template-update-stack.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "The AWS CloudFormation template for this Serverless application",
"Resources": {
"ServerlessDeploymentBucket": {
"Type": "AWS::S3::Bucket"
},
"CloudwatchUnderscoretoUnderscoreelasticsearchLogGroup": {
"Type": "AWS::Logs::LogGroup",
"Properties": {
@justinmchase
justinmchase / Program.cs
Created May 28, 2015
Simple composition pattern
View Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication4
{
class Program
@justinmchase
justinmchase / Components.js
Last active Aug 29, 2015
A hypothetical compositional language
View Components.js
component c1 {
function receive(message: string) { // handles "receive" messages
print(message)
}
}
component c2 {
var running: bool
function run() { // Handles the "run" message
if(!running)
@justinmchase
justinmchase / Design.cs
Last active Aug 29, 2015
Simple Composition Design
View Design.cs
interface IObject
{
string Name { get; }
IObject Parent { get; }
void Add(string name, IComponent component);
void Add(IObject child);
void Remove(IObject child);
IComponent GetComponent(string name);
IEnumerable<IObject> GetChildren();
You can’t perform that action at this time.