Skip to content

Instantly share code, notes, and snippets.

View kylenathan's full-sized avatar

Kyle Nathan kylenathan

  • Lion Enterprises Ltd
  • Windsor, UK
View GitHub Profile
@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@code0100fun
code0100fun / app_controllers_sign-in.js
Created June 8, 2015 20:02
Ember Simple AUth + Ember CLI Mirage
// app/controllers/sign-in.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
signIn(){
this.set('errors', null);
var params = { identification: this.get('email'), password: this.get('password') };
// Redirects to index route on success (configurable in config/environment.js)
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params);
@cs3b
cs3b / circle.ci.ember.firefox.yml
Created August 14, 2017 09:29
Circle CI Config for Ember.js project with Yarn, and Latest Firefox
version: 2
jobs:
build:
working_directory: ~/selleo-mail-log
docker:
- image: circleci/node:latest-browsers
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}