Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

William Dodson obxdesignworks

🏠
Working from home
View GitHub Profile
@obxdesignworks
obxdesignworks / product_generator.rb
Created Dec 21, 2011 — forked from jpravetz/product_generator.rb
Jekyll generator to read json data file and generate product and ingredient pages
View product_generator.rb
#------------------------------------------------------------------------
# encoding: utf-8
# @(#)product_generator.rb 1.00 29-Nov-2011 16:38
#
# Copyright (c) 2011 Jim Pravetz. All Rights Reserved.
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
#
# Description: A generator that creates product, products and
# ingredients pages for jekyll sites. Uses a JSON data
# file as the database file from which to read and
View find-unintended-body-overflow-css.js
var docWidth = document.documentElement.offsetWidth;
[].forEach.call(
document.querySelectorAll('*'),
function(el) {
if (el.offsetWidth > docWidth) {
el.style.border = "1px solid red";
console.log(el);
}
}
@obxdesignworks
obxdesignworks / macos-change-screenshot-folder.sh
Created Dec 16, 2016
Changes the default location for screenshots on macOS
View macos-change-screenshot-folder.sh
defaults write com.apple.screencapture location ~/Desktop/Screenshots;killall SystemUIServer
@obxdesignworks
obxdesignworks / settings.php
Last active Dec 1, 2016
Disable caching, preprocessing, and SSL for local site in Drupal
View settings.php
<?php
/**
* Add the following lines to the end of your sites/default/settings.php file
* to disable caching, preprocessing CSS/JS files, and disable SSL
*/
$conf['securepages_enable'] = FALSE;
$conf['cache'] = FALSE;
$conf['block_cache'] = FALSE;
$conf['preprocess_css'] = FALSE;
$conf['preprocess_js'] = FALSE;
View html5-snip.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
</body>
</html>
View gist:867651d128878c8b94e51b96ea28ad49
Verifying that +williamdodson is my blockchain ID. https://onename.com/williamdodson
@obxdesignworks
obxdesignworks / git-subtree-merge.sh
Last active Jan 4, 2016
Git subtree instead of submodule
View git-subtree-merge.sh
# Alternative to Git Submodules using Git Subtree: http://git-scm.com/book/en/Git-Tools-Subtree-Merging
# Remember to replace 'subtree-repo' with the repo name
# --prefix can be whatever you want to call your local copy
$ git remote add -f subtree-repo /path/to/subtree-repo
$ git merge --squash -s ours --no-commit subtree-repo/master
$ git read-tree --prefix=subtree-repo/ -u subtree-repo/master
$ git commit -m "Merge subtree-repo as a subtree."
# Then to update the external subtree repo:
$ git pull -s subtree subtree-repo master
@obxdesignworks
obxdesignworks / _flash.scss
Last active Jan 4, 2016
Refactored _flash.scss mixin for Bitters to allow for customizable text darkening amounts on text and links
View _flash.scss
/* replaces /bitters/mixins/_flash.scss */
@mixin flash(
$color,
$darken-text-amount: 50,
$darken-link-text-amount: 60,
$darken-link-text-hover-amount: 70
) {
background: $color;
color: darken($color, $darken-text-amount);
font-weight: bold;
View wp-custom-query-pagination.php
<?php
/**
*
* This module demonstrates pagination for a Custom Query in
* WordPress. It should work as a template in the default theme.
* Most of the formatting has been left out to make the core
* coding stand out.
*
* Author: Mac McDonald
* Contact using About->Contact Us at BluegrassMiataClub.com
@obxdesignworks
obxdesignworks / placeholder.scss
Last active Dec 18, 2015
A Sass mixin to easily style placeholder text
View placeholder.scss
// placeholder styling (use: @include placeholder(#e5e5e5);)
@mixin placeholder($color){
&::-webkit-input-placeholder {
color: $color;
}
&:-moz-placeholder { /* Firefox < 18 */
color: $color;
opacity: 1;
}
&::-moz-placeholder { /* Firefox >= 19 */