Skip to content

Instantly share code, notes, and snippets.

View chrisblackwell's full-sized avatar

Chris Blackwell chrisblackwell

View GitHub Profile
@chrisblackwell
chrisblackwell / aws-s3-bucket-policy.json
Created June 10, 2022 16:37
S3 Read and Write Bucket IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListObjectsInBucket",
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::bucket-name"]
},
{
@chrisblackwell
chrisblackwell / html-boilerplat.html
Created September 24, 2021 20:37
HTML Boilerplate (2021)
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Unique page title - My Site</title>
<script type="module">
document.documentElement.classList.remove('no-js');
@chrisblackwell
chrisblackwell / .gitignore
Created January 16, 2021 17:01
Better gitignore file
# Local Dev Files #
###################
.env
.phpunit.result.cache
docker-compose.override.yml
npm-debug.log
yarn-error.log
# Compiled source #
###################
@chrisblackwell
chrisblackwell / UuidModel.php
Last active December 13, 2019 19:44
UUID model trait for Laravel
<?php
namespace App\Traits;
use Ramsey\Uuid\Uuid;
trait UuidModel
{
/**
* Hook into the boot method to catch creating and saving events
@chrisblackwell
chrisblackwell / MakeCommand.php
Created December 13, 2018 16:38
Laravel make command
<?php
namespace App;
use Illuminate\Support\Str;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Input\InputOption;
class SomethingMakeCommand extends GeneratorCommand
{
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
/* Define the "system" font family */
@font-face {
font-family: system;
font-style: normal;
font-weight: 300;
src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Ubuntu Light"), local("Segoe UI Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma");
@chrisblackwell
chrisblackwell / .gitignore
Created July 19, 2017 22:57
Git ignore file
### Node ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Optional npm cache directory
.npm
@chrisblackwell
chrisblackwell / package.json
Created May 16, 2017 21:22
Package file for YabPack
{
"name": "yabpack",
"version": "1.0.0",
"description": "YabPack is a reference starter kit for setting up webpack",
"main": "index.js",
"scripts": {
"dev": "webpack",
"watch": "webpack --watch",
"production": "NODE_ENV=production webpack"
},

Sublime Text 3 – Useful Shortcuts (Mac)

See Sublime’s full documentation for more shortcuts and helpers.

Editing

⌘+C copy current line (if no selection)
⌘+X cut current line (if no selection)
⌘+⇧+K delete line
⌘+↩ insert line after
@chrisblackwell
chrisblackwell / webpack.config.js
Last active May 16, 2017 21:21
Webpack Example Configuration
const path = require('path');
const glob = require('glob');
const webpack = require('webpack');
const PurifyCSSPlugin = require('purifycss-webpack');
const WebpackNotifierPlugin = require('webpack-notifier');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
let isProduction = process.env.NODE_ENV === 'production';