Skip to content

Instantly share code, notes, and snippets.

View spawn-guy's full-sized avatar
🤓
Nerding around

Paul Rysiavets spawn-guy

🤓
Nerding around
View GitHub Profile

Reset

You can reset the commit for a local branches using git reset

To change the commit of a local branch:

git fetch

git reset --hard "@{upstream}"
@spawn-guy
spawn-guy / enable-websockets.config
Created March 3, 2017 13:52 — forked from wearhere/enable-websockets.config
Patches AWS Elastic Beanstalk's default nginx configuration to support websockets, for use with an Application Load Balancer.
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
// 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