Skip to content

Instantly share code, notes, and snippets.


Tyler Harms harmstyler

View GitHub Profile

Keybase proof

I hereby claim:

  • I am harmstyler on github.
  • I am harmstyler ( on keybase.
  • I have a public key ASAHu5vyMaraw8XhU-rFa8YOZMvsUMAbSkQsTwsi0gbtJQo

To claim this, I am signing this object:

View ezpublish.yml
locaction_view: # This Works
controller: "AcmeWebBundle:Content:listAllFolderChildren"
template: AcmeWebBundle:embed:folder.html.twig
Identifier\ContentType: [folder]
harmstyler / Post.php
Created April 10, 2014 01:29
Blog Post Doctrine Entity
View Post.php
namespace Blend\Iterate\BlogBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
* Post
* @ORM\Table()
harmstyler / sublime-user-settings.json
Last active August 29, 2015 13:56
My ST3 settings
View sublime-user-settings.json
// Custom color scheme available at
"color_scheme": "Packages/User/Monokai Soda (SL).tmTheme",
// Ignored packages, remove Vintage to enable VIM mode
// Soda Theme, requires "Theme - Soda" package
"theme": "Soda Dark 3.sublime-theme",
View TimeStampedEntity.php
* TimeStampedEntity.php
namespace HarmsTyler\Common\Entity;
use Doctrine\ORM\Mapping as ORM;

Div full Width/Height of viewport with jQuery

This handy piece of code allows you to create a full width/height div according to the viewport. The code also handles window resizing. Great for modal dialogs or popups.

// global vars
var winWidth = $(window).width();
var winHeight = $(window).height();

// set initial div height / width
harmstyler / gist:7896595
Last active December 30, 2015 22:49
Compares two arrays and returns boolean value. Coffeescript and Javascript versions provided
View gist:7896595
Array::equals = (array) ->
return false unless array
return false unless @length is array.length
i = 0
while i < @length
if this[i] instanceof Array and array[i] instanceof Array
# Check and recurse into the nested arrays
return false unless this[i].equals(array[i])
else if this[i] instanceof Object and array[i] instanceof Object
# Stringify objects for comparison
harmstyler /
Last active December 30, 2015 06:29
Command One Liners
harmstyler /
Created November 14, 2013 18:37
django 1.5 Project and Base Directory variables
import os
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.abspath(os.path.join(PROJECT_DIR, '../../'))
# URL prefix for static files.
# Example: "", ""
STATIC_URL = '/static/'
# Additional locations of static files

Moving from jQuery


// jQuery
$(document).ready(function() {
  // code