Skip to content

Instantly share code, notes, and snippets.

View juddlyon's full-sized avatar

Judd Lyon juddlyon

View GitHub Profile

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?

@maxrice
maxrice / us-state-names-abbrevs.php
Created May 23, 2012 18:32
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@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.
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@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
@bkeating
bkeating / wordpress-wxr-example.xml
Created February 23, 2011 16:57
A vanilla example of the WordPress WXR Schema. Im using this as a starting point to build my own comments importer for disqus.com
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dsq="http://www.disqus.com/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.0/"
>
<channel>
<item>
<!-- title of article -->
@makeusabrew
makeusabrew / label-to-placeholder.js
Created May 22, 2011 18:32
Simple jQuery snippet to convert form labels into inline placeholders
$("form :input").each(function(index, elem) {
var eId = $(elem).attr("id");
var label = null;
if (eId && (label = $(elem).parents("form").find("label[for="+eId+"]")).length == 1) {
$(elem).attr("placeholder", $(label).html());
$(label).remove();
}
});
@mdekstrand
mdekstrand / pdf-thumbnail.sh
Created February 1, 2012 17:56
Generate thumbnails of PDF files
#!/bin/sh
for file in "$@"; do
outfile="${file%%.pdf}.jpg"
echo "Thumbnailing $file to $outfile"
convert -resize 300 "$file[0]" "$outfile"
done
@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.
*/
@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;