Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Nerding around

Paul Rysiavets spawn-guy

🤓
Nerding around
View GitHub Profile
View 01-logentries.config
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: LOGENTRIES_TOKEN
value: token
files:
"/etc/rsyslog.d/logentries.conf" :
mode: "000644"
owner: root
group: root
View 01-logentries.config
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: LOGENTRIES_TOKEN
value: token
container_commands:
01_edit-rsyslog-conf:
command: echo \$template LogentriesFormat,\"$LOGENTRIES_TOKEN %HOSTNAME% %syslogtag%%msg%\\n\" > /etc/rsyslog.d/logentries.conf
02_add-second-line:
command: echo '*.* @@api.logentries.com:10000;LogentriesFormat' >> /etc/rsyslog.d/logentries.conf
@spawn-guy
spawn-guy / vpn-ec2-install.sh
Created Jul 22, 2016
l2tp/IPSec VPN on EC2 coud-init script
View vpn-ec2-install.sh
#!/bin/bash -x
# Please define your own values for those variables
# these will be injected into that script by the CFN template bootstrap script
#IPSEC_PSK=SharedSecret
#VPN_USER=username
#VPN_PASSWORD=password
# Those two variables will be found automatically
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
View gist:d37542b40b14b8c7b4c11ad781e9ab98
// a list of useful queries for profiler analysis. Starting with the most basic.
// 2.4 compatible
//
// output explained:
//
{
"ts" : ISODate("2012-09-14T16:34:00.010Z"), // date it occurred
"op" : "query", // the operation type
"ns" : "game.players", // the db and collection
@spawn-guy
spawn-guy / enable-websockets.config
Created Mar 3, 2017 — forked from wearhere/enable-websockets.config
Patches AWS Elastic Beanstalk's default nginx configuration to support websockets, for use with an Application Load Balancer.
View enable-websockets.config
container_commands:
enable_websockets:
command: |
sed -i '/\s*proxy_set_header\s*Connection/c \
proxy_set_header Upgrade $http_upgrade;\
proxy_set_header Connection "upgrade";\
' /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf