Skip to content

Instantly share code, notes, and snippets.

View zachharkey's full-sized avatar

Zach Harkey zachharkey

  • Harkey Design
  • Deep South
View GitHub Profile
@zachharkey
zachharkey / HDBLZ-LOG.md
Created September 18, 2013 05:23
HDBLZ Maintenance Log

2013-09-18

  • Configured Automatic URL Alias Patterns [Screenshot]
  • Generated 2046 URL aliases.

2013-09-21

@zachharkey
zachharkey / _ckeditor.config.js
Created September 13, 2013 22:52
Drupal CKEditor theme sample toolbar configs. Append to ckeditor.config.js
/*
* Sample toolbars
*/
//Toolbar definition for basic buttons
Drupal.settings.cke_toolbar_DrupalBasic = [ [ 'Format', 'Bold', 'Italic', '-', 'NumberedList','BulletedList', '-', 'Link', 'Unlink', 'Image','syntaxhighlight' ] ];
//Toolbar definition for Advanced buttons
Drupal.settings.cke_toolbar_DrupalAdvanced = [
['Source'],
@zachharkey
zachharkey / ckeditor.config.js
Created September 13, 2013 19:06
Drupal theme CKEditor config with syntaxhighlighter.
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/*
WARNING: clear browser's cache after you modify this file.
If you don't do this, you may notice that browser is ignoring all your changes.
*/
CKEDITOR.editorConfig = function(config) {
Title
The Ultimate Guide to Black Holes

I strongly recommend viewing the whole 56 min video.

But if you're short on time, at least watch the following clips:

<nav role="navigation">
<ul>
{% for link in linklists.main-menu.links %}
{% assign child_list_handle = link.title | handle %}
{% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %}
<li class="has-dropdown">
{{ link.title | link_to: link.url }}
<ul>
{% for child_link in linklists[child_list_handle].links %}
{% assign grand_child_list_handle = child_link.title | handle %}
{% assign src = false %}
{% if article.content contains "<img" %}
{% assign src = article.content | split: 'src="' %}
{% assign src = src[1] | split: '"' | first | replace: '//cdn', 'http://cdn';; | replace: 'http:http://';;, 'http://';; | remove: 'https:' %}
{% comment %}
Let's assume you always add images to the blog as large.
{% endcomment %}
@zachharkey
zachharkey / new_gist_file
Created August 15, 2013 03:59
This one allows me to upload an image to the assets folder to server as the thumbnail for each subcategory (aka tag). So for example, if my main collection is "books", and my tags are "fiction, nonfiction, biography", the code spits out a list of all tags with those titles, AND images with the URL: http://YOUR-STORE-CDN-URL/books-fiction.jpg, ht…
<div class="clearfix image-subcats">
<!-- Begin image subcats -->
{% if settings.collection_tags %}
{% capture col_url%}{% if collection.url.size == 0 %}/collections/all{%else%}{{collection.url}}{%endif%}{%endcapture%}
{% if collection.all_tags.size > 0 %}
{% for tag in collection.all_tags %}
<div class="product span3">
<div class="image">
<a href="{{col_url}}/{{tag | handle}}">
{% capture file_name %}{{ collection.handle }}-{{ tag | handle }}.jpg{% endcapture %}
<div class="clearfix image-subcats">
<!-- Begin image subcats -->
{% if settings.collection_tags %}
{% capture col_url%}{% if collection.url.size == 0 %}/collections/all{%else%}{{collection.url}}{%endif%}{%endcapture%}
{% if collection.all_tags.size > 0 %}
{% for tag in collection.all_tags %}
<div class="product span3">
<div class="image">
<a href="{{col_url}}/{{tag | handle}}">
{% capture file_name %}{{ collection.handle }}-{{ tag | handle }}.jpg{% endcapture %}
# Works just like the `cd` shell alias above, with one additional
# feature: `cdd @remote-site` works like `ssh @remote-site`,
# whereas cd above will fail unless the site alias is local. If
# you prefer the `ssh` behavior, you can rename this shell alias
# to `cd`.
function cdd() {
s="$1"
if [ -z "$s" ]
then
builtin cd
@zachharkey
zachharkey / Post-20130814012751.md
Created August 14, 2013 05:30
Post: Error installing ruby gem

For some reason today I could no longer install ruby gems.

Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
ERROR: Failed to build gem native extension.
    
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
    creating Makefile

make