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
# IMPORTANT: this example is potentially out of date. The latest version can be found here: https://github.com/papertrail/remote_syslog2/blob/master/examples/remote_syslog.ebextensions.config | |
# See http://help.papertrailapp.com/kb/hosting-services/aws-elastic-beanstalk/ | |
# Usage: | |
# - replace <VERSION> with the version of remote_syslog2 you want to use. Example: .../download/v0.14/remote_syslog_linux_amd64.tar.gz | |
# - replace <YOUR-TRACKED-FILES> with the files you want to monitor for new log lines. Example: - /var/log/httpd/access_log | |
# - replace <YOUR-APP-NAME> with the name of the application | |
# - replace <YOUR-LOG-DESTINATION> and <YOUR-PORT-NUMBER> with the values shown under log destinations: https://papertrailapp.com/account/destinations | |
sources: |
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
const _ = require('lodash'); | |
const Busboy = require('busboy'); | |
const getContentType = (event) => { | |
// Serverless offline is passing 'Content-Type', AWS is passing 'content-type' | |
let contentType = _.get(event, 'headers.content-type'); | |
if (!contentType) contentType = _.get(event, 'headers.Content-Type'); | |
return contentType; | |
}; |
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
"chuck this in ~/.vim/nerdtree_plugin/coffee_filter.vim (see what I did there?) | |
if exists("g:loaded_nerdtree_js_filter") | |
finish | |
endif | |
let g:loaded_nerdtree_js_filter = 1 | |
let s:extMatch = '\.\(js\|js\.map\)$' | |
call g:NERDTree.AddPathFilter("FilterCoffee") |
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
class Point | |
constructor: (@x = 0, @y = 0) -> | |
if isNaN(@x) or isNaN(@y) | |
throw new Error('Invalid coords') | |
add: (point) -> | |
@x += point.x | |
@y += point.y | |
subtract: (point) -> |
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
Spine = require('spine') | |
Accounting = require('accounting') | |
class Charge extends Spine.Model | |
@key 'amount', required: true | |
@key 'description' | |
@key 'token' | |
@key 'status' | |
@key 'outgoing', Boolean | |
@key 'created_at', Date |
NewerOlder