Skip to content

Instantly share code, notes, and snippets.

View leesheppard's full-sized avatar

Lee Sheppard leesheppard

View GitHub Profile

Adding Custom Fields to Devise

Before doing anything, please check the versions of the gem files:

gem 'rails', '~> 5.1.4'
gem 'devise', '~> 4.4.0'

Disclaimer - This solution may not work with older versions of rails and devise. Versions listed above were the latest versions of gems which I was using at the time of creation and tests. (10 Jan 2018)

@leesheppard
leesheppard / .prettierrc
Created March 20, 2019 05:39
.prettierrc_example
{
"singleQuote": true,
"trailingComma": "all"
}
@leesheppard
leesheppard / Validators
Created March 20, 2019 01:03
Validators
Meta tags
https://cards-dev.twitter.com/validator
https://developers.facebook.com/tools/debug
https://www.linkedin.com/post-inspector/
Web markup
https://validator.w3.org/
CSS
http://jigsaw.w3.org/css-validator/
@leesheppard
leesheppard / Engineering blogs for Developers
Created March 20, 2019 00:56
Engineering blogs for Developers
https://code.qantas.com/
https://engineering.linkedin.com/
@leesheppard
leesheppard / Online Integrated Development Environments (IDE)
Last active March 15, 2019 12:59
Online Integrated Development Environments (IDE)
Full Environments
https://stackblitz.com
https://aws.amazon.com/cloud9
Frontend Development Environments
https://codepen.io
https://codesandbox.io
@leesheppard
leesheppard / Alphasights_technical_challenge.md
Created March 15, 2019 12:30 — forked from tadast/Alphasights_technical_challenge.md
A technical challenge we give to our Ruby on Rails applicants in order to evaluate their coding proficiency. Job description: http://www.alphasights.com/positions/ruby-developer-london or http://www.alphasights.com/positions/ruby-developer-new-york

Alphasights Technical Challenge

Using Ruby on Rails we would like you to create a simple expert search tool. The application should fulfill the requirements below. The source code must be placed in a public repo on GitHub. The application should be deployable on Heroku.

  • I enter a name and a personal website address and a member is created.
  • When a member is created, all the heading (h1-h3) values are pulled in from the website to that members profile.
  • The website url is shortened (e.g. using http://goo.gl)
  • After the member has been added, I can define their friendships with other existing members. Friendships are bi-directional i.e. If David is a friend of Oliver, Oliver is always a friend of David as well.
  • The interface should list all members with their name, short url and the number of friends e.g. Alan http://goo.gl/3io1P (3)
@leesheppard
leesheppard / Coding Exercise websites
Last active August 9, 2019 06:28
Coding Exercise websites
https://www.hackerrank.com
https://exercism.io
https://www.codewars.com
https://devskiller.com/coding-tests-skill/ruby-on-rails
http://rubykoans.com
@leesheppard
leesheppard / .gemrc
Created May 18, 2018 01:42
example .gemrc file
# http://guides.rubygems.org/command-reference/#gem-environment
# <gem_command>: A string containing arguments for the specified gem command
# -N, --no-document - Disable documentation generation
# --[no-]document [TYPES] - Generate documentation for installed gems List the
# documentation types you wish to generate. For example: rdoc,ri
# --[no-]suggestions - Suggest alternates when gems are not found
gem: --no-ri --no-rdoc --no-document --suggestions
# The paths in which to look for gems
@leesheppard
leesheppard / gist:950f325269f2dcd9c812c2118f9e9a5b
Created November 1, 2017 23:56
https://localhost - A set of really simple commands to enable https over localhost for Mac
Reference : https://paulbrowne.xyz/https-localhost
Enter in terminal:
$ cd; mkdir .ssl
$ openssl req -newkey rsa:2048 -x509 -nodes -keyout .ssl/localhost.key -new -out .ssl/localhost.crt -subj /CN=localhost -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:localhost')) -sha256 -days 3650
$ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain .ssl/localhost.crt
/* normal flexbox */
.flexbox .flex-container {
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
}
.flexbox .flex-container.vertical {
display: -webkit-flex;
display: -moz-flex;