Skip to content

Instantly share code, notes, and snippets.

View juddlyon's full-sized avatar

Judd Lyon juddlyon

View GitHub Profile
@dsottimano
dsottimano / gist:e3e6294f80cb1cbb526d1defed322850
Last active January 5, 2024 20:01
Tech seo boost 2019 - Dave Sottimano - Apps script demo
//serpApiKey from serpapi.com
var GLOBAL_VARIABLES = {
serpApiKey : "add your api key"
}
/*
/***************************
/BEGIN PRESENTATION SCRIPTS
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@jamshedazhar
jamshedazhar / fix_content_type_s3.py
Created June 22, 2018 12:27
Sample script to fix ContentType of object stored in AWS S3.
import boto3
s3 = boto3.client('s3')
bucket_name = '<bucket name>'
valid_content_type = ['image/jpeg', 'image/png', 'image/gif']
def is_valid_header(bucket, key):
try:
@jeroenlammerts
jeroenlammerts / gist:de0471dc210749f4afe8d2e69bab46d8
Created August 31, 2017 20:33
Craft CMS 3 content migrations - create field
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
/**
* m170831_195046_second_migration migration.
*/

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

<?php
namespace Craft;
/**
* The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_pluginHandle_migrationName.
*/
class m150904_071603_inspections_DistanceText extends BaseMigration
{
/**
@johanneslamers
johanneslamers / craftcms_varnish.vcl
Last active February 26, 2019 02:46 — forked from aelvan/gist:eba03969f91c1bd51c40
Varnish 4.0 file for our Craft CMS projects
# Varnish 4.0 file for our Craft CMS projects
# Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;
@cmalven
cmalven / craft-localization-nginx
Last active October 22, 2019 12:59
nginx config for Craft CMS localization
server {
listen 80;
server_name site.production.designcompany.com;
root /home/forge/site.production.designcompany.com/public;
# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript image/svg+xml text/xml text/css;
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@DavidWittman
DavidWittman / clouddns-export.py
Last active December 12, 2018 01:06
Exports all domains for a Rackspace Cloud account in BIND9 format
#!/usr/bin/env python
import json
import os
import time
import clouddns
USERNAME = ''
APIKEY = ''