Skip to content

Instantly share code, notes, and snippets.

View farleyta's full-sized avatar
🧜‍♂️

Tim Farley farleyta

🧜‍♂️
View GitHub Profile
@farleyta
farleyta / _base.scss
Last active December 10, 2015 19:08
A starter responsive layout for SUSY and Compass. Mobile first, with breakpoints at 48em (768px by default) and 60em (960px default).
// Default mobile-first grid setup
$total-columns : 4; // a 4-column fluid grid for anything less than tablet (<48em)
$column-width : 20%; // each column is 4em wide
$gutter-width : 3%; // 1em gutters between columns
$grid-padding : $gutter-width; // grid-padding equal to gutters
$tablet-columns : 10; // 10-column fluid grid for tablets - desktop (48em - <60em)
$tablet-width : 48em; // 48em = 768px by default
$tablet : $tablet-width $tablet-columns; // Shorthand for tablet breakpoint
@farleyta
farleyta / .gitignore
Last active January 5, 2021 16:10 — forked from redoPop/.gitignore
# From: https://gist.github.com/jdbartlett/444295
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
@farleyta
farleyta / wp-config.php
Last active December 14, 2015 07:48
A Starter wp-config.php file for local and production development, based on Mark Jaquith's article here (http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/)
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@farleyta
farleyta / local-config.php
Last active December 14, 2015 07:48
The local-config.php file for setting up Wordpress on local and production environments, as per Mark Jaquith's article: http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/
<?php
// As per Mark Jaquith's article: http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/
define('DB_NAME', 'site_dev');
define('DB_USER', 'root');
define('DB_PASSWORD', 'root');
define('DB_HOST', 'localhost');
define('WP_DEBUG', true);
@farleyta
farleyta / _main.js
Created February 8, 2014 10:04
JavaScript feature-based execution
// Modified http://paulirish.com/2009/markup-based-unobtrusive-comprehensive-dom-ready-execution/
// And http://viget.com/extend/javascript-execution-patterns-for-non-web-apps
var NAMESPACE = {
// All pages
common: {
init: function() {
// Some universal variables
var breakpoint = 768;
@farleyta
farleyta / CPT-Admin.php
Created February 8, 2014 10:15
A bunch of functions to allow a custom Editor-like role for managing a specific Custom Post Type in Wordpress.
<?php
// Register Region CPT
add_action( 'init', 'register_cpt_region' );
function register_cpt_region() {
$labels = array(
'name' => _x( 'Regions', 'region' ),
@farleyta
farleyta / five-letters.js
Created January 11, 2022 14:05
Analyze the most common letters in five-letter words vs all words. Satisfies some curiosity that arose while playing Wordle.
// Webster's Unabridged English Dictionary from:
// https://github.com/adambom/dictionary
const dictionary = require("./dictionary.json");
const alphabet = 'abcdefghijklmnopqrstuvwxyz';
const fiveLetters = Object.keys(dictionary).filter(word => word.length === 5);
// console.log(alphabet.length);
// console.log(fiveLetters.length);