Skip to content

Instantly share code, notes, and snippets.

View terryupton's full-sized avatar

Terry Upton terryupton

View GitHub Profile
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@gavinhungry
gavinhungry / nginx-tls.conf
Last active March 11, 2024 14:51
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@bradp
bradp / setup.sh
Last active June 17, 2024 10:09
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@covard
covard / README.md
Last active October 7, 2020 04:42
Use OS X launchd to do automatic daily backups of local DB. This will keep files for 30 days, but is customizable. Backup script is a script my boss wrote (credit where credit is due). OS X deprecated cron.

Auto Backup Local DB

  • if nothing in logfile specified grep through the /var/log/system.log file for your launchd name

This example uses following paths that would need to be changed.

/Users/covard/bsh_scripts
/Users/covard/bsh_scripts/logs
@adamwathan
adamwathan / v-cloak.md
Last active February 26, 2023 14:26
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
@vlandham
vlandham / part1.md
Last active March 21, 2024 12:57
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master
@brettburwell
brettburwell / img.html
Last active June 26, 2018 09:05
Craft macro to centralize the markup and config for responsive images
{# ================================================================== #}
{# Responsive Image Macro
{# ================================================================== #}
{#
Macro to centralize the markup and config for responsive images.
Based on an article by Marion Newlevant (@marionnewlevant) and
adapted for the Lazysizes plugin. Read more:
https://straightupcraft.com/articles/responsive-images-with-twig-macros
@bootsified
bootsified / current-week-dates.twig
Last active January 4, 2022 20:06
Get current week's range of dates (Craft/Twig)
{# CALCULATE THIS WEEK'S DATES #}
{% set todayNum = 'now' | date('w') %}
{% set startDate = 'now' | date_modify('-' ~ todayNum ~ ' day') %}
{% set endDate = startDate | date_modify('+6 day') %}
{% set endDateFormatted = '-' ~ endDate | date('j') %}
{% if startDate | date('M') != endDate | date('M') %}
{% set endDateFormatted = ' - ' ~ endDate | date('M j') %}
{% endif %}
<p>The Week of {{ startDate | date('M j') }}{{ endDateFormatted }}</p>
@terdelyi
terdelyi / craft_validate_public_user_registration.php
Last active September 11, 2021 03:18
CraftCMS 3 - Extending the validation on the public user registration form
<?php
use Craft;
use craft\base\Element;
use craft\elements\User;
use craft\events\ModelEvent;
use yii\base\Event;
@dillingham
dillingham / Steps.vue
Last active October 27, 2021 15:18
tailwind & vue stepper
<template>
<div class>
<div class="bg-grey-light h-1"></div>
<div class="flex">
<div class="flex-1" v-for="s in steps" :key="s">
<div
v-if="step >= s"
class="bg-blue -mt-1 h-1"
:class="{ 'w-1/2': step == s, 'w-full': step < s }"
></div>