Skip to content

Instantly share code, notes, and snippets.

😀

Tyler Harms harmstyler

😀
Block or report user

Report or block harmstyler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am harmstyler on github.
  • I am harmstyler (https://keybase.io/harmstyler) on keybase.
  • I have a public key ASAHu5vyMaraw8XhU-rFa8YOZMvsUMAbSkQsTwsi0gbtJQo

To claim this, I am signing this object:

View ezpublish.yml
ezpublish:
system:
front_siteaccess:
locaction_view: # This Works
embed:
folder:
controller: "AcmeWebBundle:Content:listAllFolderChildren"
template: AcmeWebBundle:embed:folder.html.twig
match:
Identifier\ContentType: [folder]
@harmstyler
harmstyler / Post.php
Created Apr 10, 2014
Blog Post Doctrine Entity
View Post.php
<?php
namespace Blend\Iterate\BlogBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Post
*
* @ORM\Table()
View sublime-user-settings.json
{
// Custom color scheme available at http://buymeasoda.github.com/soda-theme/extras/colour-schemes.zip
"color_scheme": "Packages/User/Monokai Soda (SL).tmTheme",
// Ignored packages, remove Vintage to enable VIM mode
"ignored_packages":
[
"Vintage"
],
// Soda Theme, requires "Theme - Soda" package
"theme": "Soda Dark 3.sublime-theme",
View TimeStampedEntity.php
<?php
/**
* TimeStampedEntity.php
*/
namespace HarmsTyler\Common\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
View div-fill-viewport.md

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
$('div').css({
@harmstyler
harmstyler / gist:7896595
Last active Dec 30, 2015
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
harmstyler / one-liners.md
Last active Dec 30, 2015
Command One Liners
View one-liners.md
@harmstyler
harmstyler / statics.py
Created Nov 14, 2013
django 1.5 Project and Base Directory variables
View statics.py
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: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
View moving_from_jquery.md

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
You can’t perform that action at this time.