Skip to content

Instantly share code, notes, and snippets.

View KeithP's full-sized avatar

Keith Payne KeithP

  • equidat
  • London
  • 07:30 (UTC +01:00)
View GitHub Profile
#gemfile
...
gem 'rails', github: 'matthewd/rails', :ref => 'e4c197c7698e2'
...
$ bundle update
The git source `git://github.com/matthewd/rails.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching git://github.com/matthewd/rails.git
Fetching https://github.com/rossta/serviceworker-rails.git
# This is to enable WS support. Credits: # https://gist.github.com/Bubelbub/0a942a0d51a3d329897d
# THIS WORKS! for running the example 5.0.0.beta1 chat app on a single instance Elastic beanstalk AWS instance
files:
"/etc/nginx/conf.d/websockets.conf" :
content: |
upstream backend {
server unix:///var/run/puma/my_app.sock;
}
@KeithP
KeithP / .ebextensions redis.config
Last active March 11, 2022 06:49
install redis on AWS EC2
packages:
yum:
gcc-c++: []
make: []
git: []
commands:
redis_script_01:
command: wget https://raw.github.com/KeithP/install-redis-amazon-linux-centos/master/redis-install-script.sh
redis_script_02:
command: chmod 777 redis-install-script.sh
@KeithP
KeithP / .ebextensions\01-increase-timeout.config
Created October 23, 2014 20:38
Increase Elastic beanstalk timeout to 30 minutes
option_settings:
- namespace: aws:elasticbeanstalk:command
option_name: Timeout
value: 1800
@KeithP
KeithP / select multiple checkboxes
Created August 6, 2014 12:47
jQuery CoffeeScript for shift + click to select multiple checkboxes
lastSelected = null
checkboxHead = $( "thead :checkbox" )
checkboxes = $( "tbody :checkbox" )
checkboxHead.click (e) ->
isChecked = this.checked
checkboxes.each ->
$(this).prop( "checked", isChecked )
checkboxes.click (e) ->
thisSelected = checkboxes.index( this )
isChecked = this.checked