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 / new_gist_file_0
Created November 25, 2013 22:45
Cool Google font stack has a font that kind of looks like Gotham.
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
http://j.mp/182cxui
@zachharkey
zachharkey / Sublime-Text-2-User-Keyboard-Shortcuts.md
Created November 18, 2013 01:47
~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Default\ \(OSX\).sublime-keymap

Screenshot

[
  { "keys": ["super+k", "super+t"], "command": "title_case" },
  { "keys": ["ctrl+shift+j"], "command": "toggle_single_line_css" },
  { "keys": ["n", "n"], "command": "advanced_new_file",
    "context":

Use Drush to Export/Import a Drupal MySQL Database Dump File

Export Database to File

[...] Behold the power of Drush (once you are ssh'd in and navigated to your drupal root directory)

drush cc
drush sql-dump > ~/my-sql-dump-file-name.sql

Those two commands clear all the Drupal caches and then dump the sql database to a file in your home directory. Awesome sauce!

@zachharkey
zachharkey / index.php
Created October 30, 2013 21:24
Use php to redirect page to any destination url.
<?php header( "Location: http://www.mywebsite.com/otherpage.php" ); ?>
@zachharkey
zachharkey / Recursively copy a directory (using cp, tar or rsync).md
Last active October 8, 2024 02:57
Recursively copy a directory (using cp, tar or rsync). Reformatted from http://snipplr.com/view/26670/

Recursively copy a directory (using cp, tar or rsync)

Original Source: http://snipplr.com/view/26670/

Reformatted for improved readability and personal reference.

How does one make a recursive, identical copy of /source/ into /target/?

I suppose you want to do that for archiving or duplicating something and want to preserve "everything". That includes permissions, ownership, filetypes, timestamps etc.

@zachharkey
zachharkey / terms-of-service.md
Created October 15, 2013 14:18
Generic Terms of Service for a store website.

Title: Terms of Service Comment: General terms of business

TERMS OF SERVICE

General terms of business

OVERVIEW

This website is operated by {{business.name}}. Throughout the site, the terms “we”, “us” and “our” refer to {{business.name}}. {{business.name}} offers this website, including all information, tools and services available from this site to you, the user, conditioned upon your acceptance of all terms, conditions, policies and notices stated here.

@zachharkey
zachharkey / Test.md
Last active December 25, 2015 00:29

2013-10-08

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla

<body class="{{ template | replace: '.', ' ' | truncatewords: 1, '' }}" id="{{ page_title | handle }}">
....
</body>
{% if collection %}
{% if collection.previous_product %}
{{ '« Previous Product' | link_to: collection.previous_product }}
{% endif %}
{% if collection.next_product %}
{% if collection.previous_product %} | {% endif %}
{{ 'Next Product »' | link_to: collection.next_product }}
{% endif %}
{% endif %}