forked from rstacruz/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
277 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: AWS CLI | ||
--- | ||
|
||
### EC2 | ||
|
||
``` | ||
aws ec2 describe-instances | ||
aws ec2 start-instances --instance-ids i-12345678c | ||
``` | ||
|
||
### S3 | ||
|
||
``` | ||
aws s3 ls s3://mybucket | ||
aws s3 cp myfolder s3://mybucket/folder --recursive | ||
aws s3 sync myfolder s3://mybucket/folder --exclude *.tmp | ||
``` | ||
|
||
### ECS | ||
|
||
``` | ||
aws ecs create-cluster | ||
--cluster-name=NAME | ||
--generate-cli-skeleton | ||
aws ecs create-service | ||
``` | ||
|
||
### Homebrew | ||
|
||
``` | ||
brew install awscli | ||
aws configure | ||
``` | ||
|
||
## Elastic Beanstalk | ||
|
||
### Configuration | ||
|
||
* .elasticbeanstalk/config.yml - application config | ||
* .elasticbeanstalk/dev-env.env.yml - environment config | ||
|
||
``` | ||
eb config | ||
``` | ||
|
||
See: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html | ||
|
||
## ebextensions | ||
|
||
* see <http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html> | ||
* see <http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html> | ||
|
||
---- | ||
|
||
See: | ||
|
||
* [AWS CLI](https://aws.amazon.com/cli/) | ||
* [Documentation](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) | ||
* [All commands](http://docs.aws.amazon.com/cli/latest/reference/#available-services) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: eslint | ||
--- | ||
|
||
```js | ||
// "comma-dangle": "always" ("always-multiline", "never") | ||
var foo = { | ||
bar: "baz", | ||
qux: "quux", | ||
}; | ||
var arr = [1,2,]; | ||
``` | ||
|
||
``` | ||
// "yoda": "always" ("never") | ||
if ("red" === color) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Metalsmith | ||
--- | ||
|
||
### [metalsmith-templates](https://www.npmjs.com/package/metalsmith-templates) | ||
|
||
```js | ||
"plugins": { | ||
"metalsmith-templates": { | ||
"engine": "swig", | ||
"directory": "_layouts" | ||
} | ||
} | ||
``` | ||
|
||
Use `{{ contents }}` to bring it out | ||
|
||
Engines: | ||
|
||
* swig (like liquid) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
Sign up for opensauce | ||
|
||
- http://saucelabs.com/opensauce | ||
|
||
Install zuul | ||
|
||
``` | ||
npm i -g zuul | ||
``` | ||
|
||
Configure zuul | ||
|
||
```yml | ||
# ~/.zuulrc | ||
sauce_username: me | ||
sauce_key: abc12348-e3e2-... | ||
``` | ||
Add .zuul.yml to your project | ||
```yml | ||
# .zuul.yml | ||
ui: mocha-bdd | ||
browsers: | ||
- name: chrome | ||
version: latest | ||
- name: ie | ||
version: 6..latest | ||
- name: firefox | ||
version: latest | ||
``` | ||
Try to run tests | ||
``` | ||
zuul test/test.js | ||
zuul --local test/test.js | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
title: Slim | ||
--- | ||
|
||
```slim | ||
doctype html | ||
html | ||
head | ||
title Slim Examples | ||
meta[charset='utf-8'] | ||
meta(name="keywords" content="template language") | ||
meta name="author" content=author | ||
meta property='og:image' content=asset_url('foo.png') | ||
meta property='og:image' content=(path_to_user user) | ||
meta( | ||
property='description' | ||
content='this is the song that never ends') | ||
``` | ||
|
||
### Ruby attributes | ||
|
||
```slim | ||
a class=[:menu,:highlight] | ||
.card *{'data-url' => place_path(place)} | ||
``` | ||
|
||
### Inline ruby | ||
|
||
```slim | ||
ruby: | ||
def foobar | ||
"hello" | ||
end | ||
div= foobar | ||
``` | ||
|
||
### Embedded js | ||
|
||
```slim | ||
javascript: | ||
alert('Slim supports embedded javascript!') | ||
``` | ||
|
||
### Comments | ||
|
||
```slim | ||
/ Comment | ||
/! HTML comment | ||
``` | ||
|
||
### Ruby | ||
|
||
```slim | ||
== yield | ||
= t('.hello') | ||
- 3.times do |i| | ||
div | ||
``` | ||
|
||
### Verbatim text | ||
|
||
```slim | ||
div | ||
| This is text | ||
it is nice | ||
``` | ||
|
||
### Inline HTML | ||
|
||
```slim | ||
<div class='foo'> | ||
- if articles.empty? | ||
| Nothing here | ||
</div> | ||
``` | ||
|
||
### Inline tags | ||
|
||
```slim | ||
ul | ||
li: a(href='/') Home | ||
``` | ||
|
||
<http://slim-lang.com/> |