Skip to content

Instantly share code, notes, and snippets.

View jaketrent's full-sized avatar
🎹
Coding a power ballad

Jake Trent jaketrent

🎹
Coding a power ballad
View GitHub Profile
@jaketrent
jaketrent / verticalCenterImg.html
Created December 12, 2011 21:08
Vertically center an image in a box
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Vertically-centered Image</title>
<style>
.results {
width: 600px;
margin: 0 auto;
}
@jaketrent
jaketrent / radialgradient.html
Created May 11, 2012 20:58
Css3 radial gradient
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Radial Grandient Test</title>
<link href='http://fonts.googleapis.com/css?family=Chau+Philomene+One' rel='stylesheet' type='text/css' />
<style>
body {
padding: 0;
border: 0;
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>CSS Circle Experiment</title>
<link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css' />
<style>
body {
background: #ababab;
}
@jaketrent
jaketrent / fiddle.html
Created May 31, 2012 22:17
Handlebars Basic Test -- run w/ jsfiddle: http://jsfiddle.net/gh/gist/jquery/1.7/2846708/
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>HandlebarsJs Demo</title>
<script type="text/javascript"
src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<link href='http://fonts.googleapis.com/css?family=Righteous' rel='stylesheet' type='text/css'>
<style>
body {
@jaketrent
jaketrent / tmpl.handlebars
Created November 13, 2012 15:20
Every nth Handlebars template
{{#everyNth vids 3}}
{{#if isModZeroNotFirst}}
</div>
{{/if}}
{{#if isModZero}}
<div class="row-fluid">
{{/if}}
<div class="span4">
<div class="thumb">
<a href="{{ linkUrl }}"><img src="{{ image }}" /></a>
@jaketrent
jaketrent / d3-gauge.markdown
Last active December 24, 2015 02:19
D3 Gauge
@jaketrent
jaketrent / gist:7753020
Created December 2, 2013 17:21
Create NSMutableAttributedString
UIFont *textFont = [UIFont fontWithName:@"Helvetica" size:40];
UIColor *textForegroundColor = [UIColor blackColor];
NSMutableParagraphStyle* textParagraphyStyle = [[NSMutableParagraphStyle alloc] init];
textParagraphyStyle.lineSpacing = 15;
NSMutableAttributedString* pageText =
[[NSMutableAttributedString alloc] initWithString:@"Wow, text is being muted."
attributes:@{ NSParagraphStyleAttributeName: textParagraphyStyle,
@jaketrent
jaketrent / Brocfile.js
Created March 12, 2014 17:36
Broccoli config for coffee/concat w/ bower_components
var coffee = require('broccoli-coffee')
var concat = require('broccoli-concat')
module.exports = function (broccoli) {
var clientTree = broccoli.makeTree('client')
var bowerTree = broccoli.makeTree('bower_components')
var tree = new broccoli.MergedTree([
clientTree,
(function() {
Ember.String.pluralize = function(word) {
return Ember.Inflector.inflector.pluralize(word);
};
Ember.String.singularize = function(word) {
return Ember.Inflector.inflector.singularize(word);
};
})();
@jaketrent
jaketrent / properEmberDataUrls.js
Last active August 29, 2015 13:58
Ember-data urls proper
DS.RESTAdapter.reopen({
pathForType: function(type) {
var dasherized = Ember.String.dasherize(type);
return Ember.String.pluralize(dasherized);
}
});