Skip to content

Instantly share code, notes, and snippets.

View unr's full-sized avatar
💩
refactoring something...

Paul Morrison unr

💩
refactoring something...
View GitHub Profile
@unr
unr / gist:5389172
Created April 15, 2013 16:00
Example of my Project model.
App.Project = Em.Object.extend
# Trying to optimize phase load times
showPhases: false
phases: (->
if !@_children
@set '_children', Em.A()
childPhases = @get('childPhases')
if childPhases
@unr
unr / pr.md
Created September 5, 2013 14:37 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@unr
unr / ligatures.css
Created September 11, 2013 14:54
Enable Font Ligatures in CSS
speak: none;
/* Enable Ligatures */
-webkit-font-feature-settings:"liga","dlig";
-moz-font-feature-settings:"liga=1, dlig=1";
-moz-font-feature-settings:"liga","dlig";
-ms-font-feature-settings:"liga","dlig";
-o-font-feature-settings:"liga","dlig";
font-feature-settings:"liga","dlig";
text-rendering:optimizeLegibility;
@unr
unr / functions.php
Created May 30, 2014 15:37
The standard functions.php from
<?php
/**
* Twenty Fourteen functions and definitions
*
* Set up the theme and provides some helper functions, which are used in the
* theme as custom template tags. Others are attached to action and filter
* hooks in WordPress to change core functionality.
*
* When using a child theme you can override certain functions (those wrapped
* in a function_exists() call) by defining them first in your child theme's
@unr
unr / class_example.php
Last active August 29, 2015 14:02
An example of static classes in php.
<?php
// Declare our class, and its init function
class Example {
public static function init() {
echo "Hello World";
}
}
// This will echo hello world, from the class
Example::init();
@unr
unr / class.php
Last active August 29, 2015 14:02
An example of using classes to bootstrap a WordPress Theme.
<?php
/**
* Our main class for our theme.
*
* This will act as our controller, and activate other hooks/functions for wordpress.
*/
class Example {
// Called by our bootstrap_theme function
@unr
unr / class.php
Last active August 29, 2015 14:02
An expanded example of using hooks and classes in WordPress.
<?php
/**
* Our main class for our theme.
*
* This will act as our controller, and activate other hooks/functions for wordpress.
*/
class Theme {
// Called by our bootstrap_theme function
@unr
unr / AppController.php
Created June 19, 2014 15:29
Example of my AppModel i18n issue
<?php
App::uses('Date', 'Model');
class AppController extends Controller {
// Rest of my app stuff
}
$('.js-toggle-link').on('click', function(e) {
var target = $(e.currentTarget).data('toggle-target');
$(target).toggle();
});
@unr
unr / build.md
Last active August 2, 2016 16:54
Trap Master | Status ATK+2 | Stamina Thief

Trap Master | Status ATK+2 | Stamina Thief

Going to lock you down, bitch.

  • Skull Visage (or anything with Torso Inc)
  • Bnahabra Suit S (King Scarab x2, Monster Broth x2, Bnahbra Shell x3, Bnahbra Carapace x2)
  • Gammoth Braces S (Trunkspine x4, Paddock Oil+ x3)
  • Bnahabra Coil S (King Scarab x2, Monster Broth x1, Bnahabra Carapace x2, Bnahabra Wing x4)
  • Maccao Shinguards S (Avian Finebone x4, Maccao Scale+ x4, Maccao Hide x10, Great Maccao Hide x5)