Skip to content

Instantly share code, notes, and snippets.

View aronhoyer's full-sized avatar

Aron Høyer aronhoyer

  • Knowit
  • Norway
  • 23:03 (UTC +02:00)
View GitHub Profile
.actions { /* ... */ }
.actions__user { /* ... */ }
.user__avatar { /* this could clash later on though */ }
.user__info { /* ... */ }
function passwordIsValid(password) {
if (password.length < 8 || password.length > 255) return false
const upper = []
const lower = []
const num = []
const special = []
password.split("").forEach(c => {
if (upper.length === 0 && c.match(/[A-Z]/)) upper.push(c)
@aronhoyer
aronhoyer / _grid.scss
Last active August 29, 2021 21:15
SASS grid system with CSS grid
$screen-sizes: (
xxl: 1920px,
xl: 1440px,
l: 1360px,
ml: 1280px,
m: 768px,
s: 576px
);
$col-count: 24;
@aronhoyer
aronhoyer / mkcraft.sh
Created November 26, 2018 15:01
Simple shell script to automate Craft project setup.
#######################################
# Creates a Craft project in a given directory, and runs the Craft setup CLI
# Arguments:
# Path to directory
#######################################
function mkcraft() {
composer create-project craftcms/craft $1 && cd $1 && ./craft setup
}
@aronhoyer
aronhoyer / macos-setup_tools.sh
Last active April 25, 2019 05:53
Tools setup for macOS Mojave
# Install xcode command line tools
xcode-select --install
# Install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
# Install latest version of ZSH
brew install bash
sudo vim /etc/shells