Skip to content

Instantly share code, notes, and snippets.

David Potsiadlo davidpots

Block or report user

Report or block davidpots

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3a6570d3aa094ada3aca
View gist:40ed4aebb70e21c2e6cd

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.

View Add item to array if it doesn't exist
// 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 );
} );
View Display tags, if they exist
{% if podcast.tags %}
{% for tag in podcast.tags %}
<li>{{ tag }}</li>
{% endfor %}
{% endif %}
davidpots / gist:4cf277080087c2a1a84f
Last active Aug 29, 2015
Ukulele tab for "Wake Up" by Arcade Fire
View gist:4cf277080087c2a1a84f

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:

Intro and chorus

View gist:6cfafc2bf60d23c8ede1
- Subscribe to podcasts / add episodes via website
davidpots / gist:fe9d5eae4f86970bda55
Created Jul 31, 2014
FretMonster instrument JSON
View gist:fe9d5eae4f86970bda55
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
View gist:0e8ca1f940dc73d42b4a
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
View gist:604f87ed2a858b381766
0 = none
xs = extra small
s = small
m = medium
l = large
x = extra
xl = extra large
xxl = extra extra large
You can’t perform that action at this time.