Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris James cajames

View GitHub Profile
@molomby
molomby / Keystone 5 - Secure Cookies and Reverse Proxies.md
Created Mar 31, 2020
Background and instructions for fixing cookie issues encountered when deploying Keystone 5 apps behind a reverse proxy (like nginx)
View Keystone 5 - Secure Cookies and Reverse Proxies.md

Keystone 5: Secure Cookies and Reverse Proxies

Can't sign in, eh?

TL;DR

When...

  • Keystone sessions are being used (eg. for authentication)
  • secureCookies Keystone config is true (the default when NODE_ENV is 'production')
View nginx
# block content
location ~ ^/content/(.*).(txt|md|mdown)$ {
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect;
}
# block all files in the site folder from being accessed directly
location ~ ^/site/(.*)$ {
rewrite ^/site/(.*)$ /error redirect;
}
@denji
denji / homebrew-rvm.md
Last active Aug 20, 2021
Homebrew + RVM > Awesome
View homebrew-rvm.md

The MBP is my development machine, so I needed all of my tools installed with the ability to update them with ease. In the past, I used MacPorts to take care of my MySQL, Memcached, and Ruby installions and it worked just fine. This time around however, I wanted something new and fun. Homebrew.

Homebrew is a new package manager for OS X. Unlike Fink or MacPorts, Homebrew integrates with the core operating system, reducing the number of extra libraries to install etc. Another neat feature is the ability to write software package recipes in Ruby, awesome.

Here are some raw installation instructions (clean system). I like to keep everything under user ownership to make life more enjoyable, say no to sudo.

You will need the latest version of xcode, you can get it here. After the installation is complete, you may continue.

sudo mkdir /usr/local
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active Sep 22, 2021
A better markdown cheatsheet.
View markdown-cheatsheet.md
@malarkey
malarkey / Contract Killer 3.md
Last active Nov 18, 2021
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………