Skip to content

Instantly share code, notes, and snippets.

View anthonybrown's full-sized avatar
🎯
Focusing

Tony Brown anthonybrown

🎯
Focusing
View GitHub Profile

Adaptive Image Element

Author:

Mat Marquis

Status of this Document

This is an unofficial draft spec, not formally endorsed by the WHATWG. It is suitable only for reviewing the details of the proposed element.

Table of Contents

./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--sysconfdir=/private/etc \
--with-apxs2=/usr/sbin/apxs \
--enable-cli \
--with-config-file-path=/etc \
--with-libxml-dir=/usr \
--with-openssl=/usr \
@anthonybrown
anthonybrown / Backbone View extend
Created February 24, 2014 11:30
If you get `options undefined` error, it is because Backbone v.1.1.0 and later no longer automatically attach options passed to the constructor as this.options. This can be fixed by adding an initialized function to AppName.AppLayout = Backbone.View.extend().
AppName.AppLayout = Backbone.View.extend({
initialize: function(options){
this.options = options || {};
},
})
var BuildTemplate = ' \
<h2 class="small-caps">build</h2> \
';
var BuildV = BaseV.extend({
className: 'btn-group-vertical',
initialize: function(o){
this.__player = o.player;
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
@anthonybrown
anthonybrown / undefined method `id' for nil:NilClass
Created March 2, 2014 19:59
NoMethodError in SubscriptionsController#new
'Extracted source (around line #27):'
if cookies[:mentor_id].blank?
cookies[:mentor_id] ||= @mentor.id
end
end
end
app/controllers/subscriptions_controller.rb:27:in `assign_mentor'
@anthonybrown
anthonybrown / ajaxTemp-01
Created March 7, 2014 10:15
Ajax basic jQuery template
$('.show-comments').on('click', function(e) {
e.preventDefault();
$.ajax({
url: 'http://jsbin.com/Amen/2/js'
, type: 'get'
, dataType: 'json'
, success: function (data) {
$('.comment-count').text( formatCommentCount(data.length) );
# you can style the css that sass compiles: expanded is the most readable, there compress and compact as well
# documentation can be found on the guard github.com page
guard 'sass', :input => 'sass', :output => 'css', :style => :expanded
@anthonybrown
anthonybrown / Change quotes
Last active August 29, 2015 13:57
A regEx to change " to ' and ' to "
Single quotes to double quotes
:%s/'\(\([^']*\)\)'/"\1"/g
Double quotes to single quotes
:%s/"\(\([^"]*\)\)"/'\1'/g