Skip to content

Instantly share code, notes, and snippets.

@davidpots
davidpots / oocss-resources.md
Last active August 29, 2015 14:02
OOCSS Articles, Videos, and Resources

##Articles

An Introduction To Object Oriented CSS (OOCSS)
Great intro from Smashing Magazine on the topic of OOCSS. On the topic of a multi-class approach to declaring styles:

Some may feel that this type of styles abstraction clutters the HTML and goes against the principle of separating markup from presentation.

But putting aside any debates about how this might affect the markup, no one can question that this abstraction has now made it easier to track down and modify the common styles that are used to structure these three elements.

About HTML Semantics and Front-End Architecture
by Nicolas Gallagher. I love this article so much -- it says it all (IMO) perectly. Amongst other things, great talk about semantics as well as why he prefers a multi-class approach vs. that of @extend.

Yours:
0 = none
xs = extra small
s = small
m = medium
l = large
x = extra
xl = extra large
xxl = extra extra large
@davidpots
davidpots / podcastList2013.md
Last active August 29, 2015 14:04
Podcast list (2013)
Create an app:
rails new whatever
Generate some scaffolding:
rails generate scaffold User name:string
rails generate scaffold Item user_id:integer collection_id:integer name:string
rails generate scaffold Collection user_id:integer name:string
@davidpots
davidpots / gist:fe9d5eae4f86970bda55
Created July 31, 2014 11:05
FretMonster instrument JSON
var instruments = {
'guitar' : { 'name' : 'guitar',
'numStrings' : 6,
'fretsToLabel' : [1,3,5,7,9,12,15],
'stringLabels' : ['E','B','G','D','A','E'],
'stringDiff' : {
1 : 0, // E string (high)
2 : 5, // B string
3 : 9, // G string
4 : 2, // D string
@davidpots
davidpots / gist:6cfafc2bf60d23c8ede1
Created July 31, 2014 17:37
Overcast FM Wishlist
- Subscribe to podcasts / add episodes via website
@davidpots
davidpots / gist:4cf277080087c2a1a84f
Last active August 29, 2015 14:05
Ukulele tab for "Wake Up" by Arcade Fire

A terrific song. What I'm most interested in capturing are not only the chords, but a way to continually strum them so that the melody can be heard. Here's how I play each section.

Audio sample of me playing

Here's a clip of me playing this on ukulele, using the exact tabs I have below: https://soundcloud.com/davidpots/ukulele-practice-wake-up-by-arcade-fire

Intro and chorus

A-|---3---0--------3---0---3---3------------|-

E-|---3---3--------3---3---3---0------------|-

@davidpots
davidpots / Display tags, if they exist
Last active August 29, 2015 14:13
Jekyll loop notes
{% if podcast.tags %}
<ul>
{% for tag in podcast.tags %}
<li>{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
// On a page with many .item elements, where each element has many tags .item__tag
// This will create an array 'tagList' that contains all tags (without duplicates)
var tagList = [];
$.each( $('.item__tag'), function(i,obj) {
nextTag = obj.innerText;
if ($.inArray(nextTag,tagList) == -1) {
tagList.push( nextTag );
}
} );

Here's a holy shit idea I have. Sort of.

(a) Imagine apple watch exists and is iterated on and is widely used etc.

(b) imagine apple watch has the ability to accept morse-code-like tap patterns from users without requiring them to unlock the screen first. So basically, I could do what Lando Calrissian did when he slyly sent a message to this bald friend to arrange a stormtrooper ambush.

(c) Okay, imagine apple watch is cognizant that I'm listening to podcasts, and what episode I'm listening to, and the current timestamp.

(d) imagine if I tap a certain pattern while a podcast is playing (e.g., triple-tap to denote this pattern is for the Podcast app, and then long-short-short taps to denote _this means drop a flag / timestamp / star / bookmark at current timestamp of current episode.