Skip to content

Instantly share code, notes, and snippets.

View richardking's full-sized avatar

Richard King richardking

  • Instacart
  • San Francisco, CA
View GitHub Profile
https://www.instacart.com/store?ko_click_id=ko_bbcb5ccc7c94dcd54&utm_source=instacart_impactradius&utm_campaign=ad_demand_retargeting&utm_medium=affiliate
@richardking
richardking / aws.lambda.upload.error.output
Created January 8, 2017 20:14 — forked from djm/aws.lambda.upload.error.output
Node Lambda Upload Error: "Cross-account pass role is not allowed"
Reading zip file to memory
Uploading zip file to AWS Lambda eu-west-1 with parameters:
{ FunctionName: 'xxx-staging-1-0-0',
FunctionZip: <Buffer 50 478 0b 00 ...>,
Handler: 'index.handler',
Mode: 'event',
Role: 'arn:aws:iam::xxx:role/xxx',
Runtime: 'nodejs',
Description: 'Resizes images for the xxx project.',
MemorySize: '512',
## Terms
### General Programming/CS
**Threads** vs **Processes**
A process is an instance of a program in execution. A process is an independent entity to which resources are individually allocated.
One process cannot access another process's variables and data structures.
One process can have many threads.
Threads within a process share resources, including heap space.
## Terms
### General Programming/CS
**Threads** vs **Processes**
A process is an instance of a program in execution. A process is an independent entity to which resources are individually allocated.
One process cannot access another process's variables and data structures.
One process can have many threads.
Threads within a process share resources, including heap space.
## Terms
### General Programming/CS
**Threads** vs **Processes**
A process is an instance of a program in execution. A process is an independent entity to which resources are individually allocated.
One process cannot access another process's variables and data structures.
One process can have many threads.
Threads within a process share resources, including heap space.
@richardking
richardking / dockercon
Created June 12, 2014 15:47
Dockercon
#### tl;dr:
Dockercon was definitely one of the most educational conferences I've been to. It's rare that a technology gets people so universally excited and eager to use it. And the problems Docker are solving - getting local code into the cloud, ship great software quickly // getting dev code to running and serving prod traffic - are definitely something for both developers and DevOps to be excited over.
The benefit of such a new, quickly-embraced technology is that a lot of smart people are working on it, and tools around it. However, the drawback is that there is a lot of repeated work. This was shown when multiple talks (at least 4) were about custom built orchestration tools for Docker. This also showed the need for solutions to manage Docker images and containers once you are using it with a multi-layered production application.
However, it seems to me that Docker is definitely the future; Google, redhat, Rackspace, Amazon are just some of the companies throwing their full weight behind it. It seem
@richardking
richardking / lighthouse_db and EB
Created June 3, 2014 22:42
Lighthouse_db and EB
First you'll need to clone the ```docker-1``` branch of lighthouse_db at <https://github.com/richardking/lighthouse_db/tree/docker-1>. After you clone it, compress the tree into a .zip file[^note].
Also you may want to create an SSH key-pair in the EC2 Console so you can SSH into the EC2 instance after it is built:
![](http://bleacher-report.d.pr/aTAS+)
### Within Elastic Beanstalk console
Start by clicking the 'Create a New Application' in the Elastic Beanstalk console.
@richardking
richardking / gist:adf87012ac39249a9c24
Created June 3, 2014 19:48
Dockerfile bundle tmp
# FROM ubuntu
FROM richardking/ubuntu-nginx-2.1.1
# RUN apt-get update -q
# RUN apt-get install -qy nginx
# RUN apt-get install -qy curl
# RUN apt-get install -qy git
# RUN apt-get install -qy nodejs
# RUN apt-get install -qy postgresql
# RUN apt-get install -qy libpq-dev
@richardking
richardking / gist:77c09c8753fd9b5a003c
Created May 23, 2014 00:31
docker/eb sample app log file
-------------------------------------
/var/log/eb-version-deployment.log
-------------------------------------
2014-05-20 23:33:13,180 [INFO] Found the latest version manifest file <Key: elasticbeanstalk-us-east-1-867690557112,resources/environments/e-nanjebqhd3/_runtime/versions/manifest_1400628237687> from bucket elasticbeanstalk-us-east-1-867690557112 and prefix resources/environments/e-nanjebqhd3/_runtime/versions/
2014-05-20 23:35:57,798 [INFO] Downloaded the manifest file to /tmp/version_file_manifest
2014-05-20 23:35:57,894 [INFO] Downloaded version label Sample Application from s3 key <Key: elasticbeanstalk-us-east-1-867690557112,resources/environments/e-nanjebqhd3/_runtime/_versions/richardsample1/Sample Application>
-------------------------------------
@richardking
richardking / gist:11296917
Created April 25, 2014 17:22
deleting an instagram in a team stream
1) Find instagram in api endpoint- e.g.
http://api.bleacherreport.com/api/v1/team_streams/baltimore-ravens
2) Look for instagram- e.g.
{
type: "Instagram",
id: 763,
tag: 148,
publishedAt: "2014-04-25T17:02:34Z",
programmedAt: "2014-04-25T17:02:34Z",