Skip to content

Instantly share code, notes, and snippets.

View carrieforde's full-sized avatar

Carrie Forde carrieforde

View GitHub Profile
@carrieforde
carrieforde / Form.tsx
Created July 21, 2022 21:13
MUI snippets / utility components
import { Box, Paper, PaperProps, styled } from "@mui/material";
import React, { FormEvent, ReactNode } from "react";
import { StyledForm, FormBody } from "./Form.styles";
export const StyledForm = styled(Paper)<PaperProps & { component: string }>(
({ theme }) => ({
display: "flex",
flexDirection: "column",
gap: theme.spacing(2),
padding: theme.spacing(3),
@carrieforde
carrieforde / webpack.config.js
Last active July 25, 2020 23:16
Creating multiple output files
const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
context: __dirname,
entry: {
block_one: ["./block-one/index.js", "./block-one/styles.css"],
block_two: ["./block-two/index.js", "./block-two/styles.css"],
},
output: {
@carrieforde
carrieforde / Gulpfile.js
Created October 25, 2017 16:42
Getting started with task-running & Gulp
var gulp = require('gulp');
var cleanCSS = require('gulp-clean-css');
var minimist = require('minimist');
var uglify = require('gulp-uglify');
var pump = require('pump');
var sass = require('gulp-sass');
var imagemin = require('gulp-imagemin');
var html5Lint = require('gulp-html5-lint');
var csslint = require('gulp-csslint');
var jshint = require('gulp-jshint');
@carrieforde
carrieforde / smooth-scroll.js
Last active October 17, 2017 19:08
Smooth scroll
/**
* Add smooth scrolling for on-page navigation.
*/
(function() {
// Script options.
var options = {
menuSelector: '.site-navigation ul',
mobileBreakPoint : 900,
headerHeight: 0,
@carrieforde
carrieforde / _grid.scss
Last active May 19, 2017 19:41
Grids + Neat 2.0.0
//--------------------------------------------------------------
// GRID
//--------------------------------------------------------------
// Outputs .prefix-col-#
.prefix {
@include grid-classes(null, $neat-grid);
}
git init # initialize a new repo
git clone <remote repo> <directory name> # clone an existing repo to your machine
git status # see what files have been modified or added, if you’ve fetched recently, check where your local is in relation to the remote
git add <file or directory>, git add -A # if you want to choose with files to add, use git add <file>, otherwise, git add -A will stage everything that has new or has been modified
git commit -m “<message>” # commit your staged files
git fetch <remote> <remote branch> # fetch any changes on remote. Both the remote name and remote branch are optional. Use in conjunction with git status
git pull <remote> <remote branch> # pull the latest version of the remote to your local
git push <remote> <remote branch> # push your local changes to the remote (you may need to set up your remote first!)
git remote add <remote name> <remote repo> # set up a r
@carrieforde
carrieforde / bem-mixins.scss
Last active January 4, 2017 04:37
Sass snippets
@mixin element($element) {
&__#{$element} {
@content;
}
}
@mixin modifier($modifier) {
&--#{$modifier) {
@carrieforde
carrieforde / brackets-snippets.yml
Created November 21, 2016 18:06
Helpful Snippets for WordPress development in Brackets
- trigger: wdsjs
description: jQuery - The WDS Way
scope: javascript
mTime: 1473172253165
text: |
/**
* ${1:Foo Script}.
*/
window.${2:Foo_Object} = {};
( function( window, $, app ) {