Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

David Miranda panphora

🎯
Focusing
View GitHub Profile
View notify.js
const mailgun = require('mailgun-js')({apiKey: api_key, domain: domain});
const twilio = new require('twilio')(accountSid, authToken);
export default function notify (to, msg, options) {
if (Array.isArray(to)) {
to.forEach((toSingle) => notify(toSingle, msg, options));
return;
}
if (to.includes("@")) {
@panphora
panphora / expand-podcast-to-see-episodes.js
Created Sep 14, 2017
Modifying overcast.fm to make it more like the app
View expand-podcast-to-see-episodes.js
var $activeEpisodes = $(".episodecell");
var episodesReversedElements = $activeEpisodes.toArray().reverse();
var lastPodcastName;
episodesReversedElements.forEach(function (elem) {
var $activeEpisode = $(elem);
var podcastName = $activeEpisode.find(".titlestack div:first-child").text();
var podcastImgSrc = $activeEpisode.find(".art").attr("src");
if (podcastName !== lastPodcastName) {
View overcast.js
window.addEventListener("keydown", (event) => {
if (event.keyCode === 32) {
event.preventDefault();
if (player.paused) player.play(); else player.pause();
}
});
View slow-down-twitch-chat.js
// INSTRUCTIONS
// 1. paste in Google Chrome dev console
// 2. enjoy!
// don't display any chat messages by default
var style = document.createElement("style");
style.appendChild(document.createTextNode(""));
document.head.appendChild(style);
style.sheet.insertRule("body .ember-chat .chat-messages .chat-line {display: none;}", 0);
View gist:4c9d7945898140638573
### Keybase proof
I hereby claim:
* I am panphora on github.
* I am panphora (https://keybase.io/panphora) on keybase.
* I have a public key whose fingerprint is 516E 6816 D1C8 3E13 587F EE35 3D43 81AC 9975 8203
To claim this, I am signing this object:
View gist:3b18ebf0da36386e114c
Template.DiscoverPage.events({
'click .tab-link': function (e, template) {
e.preventDefault();
var $tabLink = $(e.currentTarget);
var tabName = $tabLink.data('tab-name');
template.currentTab.set(tabName || 'recent projects');
}
});
View gist:37ac9020982185e58e0c
Template.DiscoverPage.helpers({
currentTabIs: function (tabName) {
return Template.instance().currentTabIs(tabName);
},
selectedIfCurrentTabIs: function (tabName) {
if (Template.instance().currentTabIs(tabName)) {
return 'selected';
} else {
return '';
}
View gist:dab7f797df50367006a1
<template name="DiscoverPage">
<div class="nav">
<a class="tab-link {{selectedIfCurrentTabIs 'recent projects'}}" href="#" data-tab-name="recent projects">recent projects</a>
<a class="tab-link {{selectedIfCurrentTabIs 'recent sketches'}}" href="#" data-tab-name="recent sketches">recent sketches</a>
</div>
{{#if currentTabIs 'recent projects'}}
{{> RecentProjects }}
{{/if}}
{{#if currentTabIs 'recent sketches'}}
{{> RecentSketches }}
View gist:0d3bfe1061807d58aff8
Template.DiscoverPage.created = function () {
this.currentTab = new ReactiveVar('recent projects');
this.currentTabIs = function (tabName) {
return tabName === Template.instance().currentTab.get();
}
};
View gist:a03a5e3e0a9ba6d7b316
Template.DiscoverPage.created = function () {
this.currentTab = new ReactiveVar('recent projects');
};
You can’t perform that action at this time.