Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
SvelteKit is bae!

Scott Spence spences10

💭
SvelteKit is bae!
View GitHub Profile
@spences10
spences10 / README.md
Created Jan 14, 2021
What a good README.md should have:
View README.md

README.md

  • Description of the problem and solution.
  • Whether the solution focuses on back-end, front-end or if it's full stack.
  • Reasoning behind your technical choices, including architectural.
  • Trade-offs you might have made, anything you left out, or what you might do differently if you were to spend additional time on the project.
  • Link to other code you're particularly proud of.
@spences10
spences10 / fontFace.js
Created Jun 23, 2018
Font Face helper function by mschipperheyn
View fontFace.js
/**
* Awesome helper function from Marc Schipperheyn
* https://github.com/mschipperheyn 👌
*
*/
export function fontFace(
name,
src,
fontWeight = 'normal',
@spences10
spences10 / interviewQuestions.md
Last active Apr 28, 2018
List of questions to ask employers at interviews
View interviewQuestions.md

Interview Questions You Should Ask

Why me as a candidate?

I like to ask this one so you can gauge if you're just there to make up the numbers or if they're really interested in you and have read your CV/profile.

How can I best prepare for this role before starting?

This question lets them know you're excited not only about the role, but also about starting and self-learning! You're a go getter and that's great! Plus, having this answered will give you a jump start on being prepared for your first day.

View recruiter-reply.md

Hey {recruiter-name},

Thanks for getting in touch about the {role} at {company} you're interested in talking to me about.

Before we have a chat I'd like to know a bit about the role and the company first, take this as an initial discussion, please could you tell me.

  • What's the work-life balance?
@spences10
spences10 / script.md
Created Apr 26, 2018
Set up CentOS on Vagrant for CrafterCMS
View script.md

Install dependencies on CentOS

For Crafter > Java, Git

use root:

sudo -i
# switch back with 'su - vagrant' when needed
@spences10
spences10 / script.md
Last active Apr 26, 2018
Install fish shell on CentOS via Vagrant
View script.md

Install fish and oh my fish on CentOS

If you haven't updated to the latest version of git take a look at this SO post on [installing Git on CentOS] also take a look at the [full post here] for installing fish on other OS'

# switch back with 'su - vagrant' or preferred user when needed
sudo -i
cd /etc/yum.repos.d/
# install wget
yum -y install wget
@spences10
spences10 / script.md
Created Apr 26, 2018
Install fish shell on CentOS via Vagrant
View script.md

Install fish and oh my fish on CentOS

If you haven't updated to the latest version of git take a look at this SO post on [installing Git on CentOS]

# switch back with 'su - vagrant' or preferred user when needed
sudo -i
cd /etc/yum.repos.d/
# for CentOS 7
wget http://download.opensuse.org/repositories/shells:fish:release:2/CentOS_7/shells:fish:release:2.repo
View button.js
export const Button = styled.button`
font-size: 1rem;
border-radius: 5px;
padding: 0.25rem 1rem;
margin: 0 1rem;
background: transparent;
color: ${props => props.theme.primary};
border: 2px solid ${props => props.theme.primary};
${props =>
@spences10
spences10 / slugIt.js
Last active Mar 30, 2018
Slug helper!
View slugIt.js
export const slugIt = text => {
if (!text) return
return text
.toString()
.toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, '') // Trim - from end of text
@spences10
spences10 / README.md
Last active Mar 22, 2018
Readme pattern
View README.md

README pattern

Optimal README layout from Kent Dodds [source]:

  1. Title + tagline + logo?
  2. Badges
  3. The problem
  4. The solution
  5. TOC
  6. Installation