This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Provides a mixin to define hyphenation | |
// | |
// Requires Compass | |
// | |
// (http://blog.fontdeck.com/post/9037028497/hyphens) | |
// (http://www.w3.org/TR/css3-text/#hyphenation) | |
// | |
// $value - The hyphenation property value. One of "none", "manual", "auto" or "all" | |
// | |
// Example .scss: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fixes URLs to asset files. | |
* | |
* If SITE_URL is left blank then WordPress will assume that the SITE_URL is | |
* the current URL which causes problems when the current URL is not the root | |
* page. So, instead of linking to | |
* /wp-content/themes/themename/js/main.js it would link to | |
* /some-page-name/a-child-page/wp-content/themes/themename/js/main.js which | |
* breaks things. This attemps to fix this. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XMPP = {}; | |
// ............................................... | |
// Models | |
// | |
XMPP.BOSHConnection = SC.Record.extend({ | |
primaryKey: 'jid', | |
jid: SC.Record.attr(String), | |
password: SC.Record.attr(String), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mergesort = (input) -> | |
n = input.length | |
if n == 1 | |
return input | |
pivot = Math.floor n/2 | |
a = mergesort input[0...pivot] # coffee script does not include the last element in a slice | |
b = mergesort input[pivot...n] | |
merge(a, b) | |
merge = (a, b) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://gist.github.com/854622 | |
(function(window,undefined){ | |
// Prepare our Variables | |
var | |
History = window.History, | |
$ = window.jQuery, | |
document = window.document; | |
// Check to see if History.js is enabled for our Browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from "ember"; | |
var get = Ember.get; | |
var copy = Ember.copy; | |
var removeObserver = Ember.removeObserver; | |
var addObserver = Ember.addObserver; | |
var DocumentTitleMixin = Ember.Mixin.create({ | |
titleTokensDidChange: function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var User = DS.Model.extend({ | |
messages: DS.hasMany('message', {polymorphic: true}) | |
}); | |
var Message = DS.Model.extend({ | |
user: DS.belongsTo('user'), | |
body: DS.attr() | |
}); | |
var Post = Message.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@em: 1em; | |
@multiplierLarge: 2.3; | |
@multiplier: 2; | |
.headingsX(@index) when (@index > 0) { | |
(~"h@{index}") { | |
font-size: ((@em * @multiplierLarge) - ((@index * ((@em * @multiplierLarge) / 6 )))) + (@em * @multiplier); | |
} | |
.headingsX(@index - 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Style any number of headings in one fell swoop: | |
// This is not yet supported by Stylus, see https://github.com/LearnBoost/stylus/issues/608 for more information. | |
headings(1..6) | |
for heading in headings() | |
h{{heading}} | |
@content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Justify inline block elements for a percentage grid without specifying margins: LESS mixin. See http://www.barrelny.com/blog/text-align-justify-and-rwd/ */ | |
.jgroup { | |
text-align: justify; | |
font-size: .01px; | |
&:after{ | |
content: ''; | |
display: inline-block; | |
width: 100%; |