This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"object": "customer", | |
"created": 1409190039, | |
"id": "cus_4fdAW5ftNQow1a", | |
"livemode": false, | |
"description": "new_paying_customer", | |
"email": null, | |
"delinquent": false, | |
"metadata": {}, | |
"subscriptions": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmux() { | |
if [ -z "$1" ] | |
then | |
tmux new -s $(basename `pwd` | xargs printf) | |
else | |
tmux new -s "$1" | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Project: Ember ListView | |
// Copyright: ©2012-2013 Erik Bryn, Yapp Inc., and contributors. | |
// License: Licensed under MIT license | |
// Version: 0.0.5 | |
// ========================================================================== | |
(function(global){ | |
var define, requireModule, require, requirejs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adapted from http://scottnelle.com/414/updated-fluid-app-userscript-for-gmail-unread-count/ | |
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 15000); | |
function updateDockBadge() { | |
var dueSoon = $(".badge.badge-state-due-soon").length || ''; | |
console.log('updating dockBadge to', dueSoon) | |
window.fluid.dockBadge = dueSoon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
heightForIndex: function(idx){ | |
var entry = this.get('content').objectAt(idx); | |
if (entry.get('rowHeight')) { | |
return entry.get('rowHeight'); | |
} else { | |
return this.rowHeight; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ~/Mail | |
git commit -m "Before sync. $(date +%s)" --allow-empty | |
git fsck --strict --full | |
mbsync boxes | |
rm contents && du -h -d1 >> contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func files(dir string) ([]string, error) { | |
files, err := ioutil.ReadDir(dir) | |
if err != nil { | |
return nil, err | |
} | |
filenames := make([]string, 0) | |
for _, f := range files { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Makefile.am | |
=================================================================== | |
--- Makefile.am (revision 14528) | |
+++ Makefile.am (working copy) | |
@@ -45,7 +45,7 @@ SUPP_FILES = \ | |
exp-sgcheck.supp \ | |
darwin9.supp darwin9-drd.supp \ | |
darwin10.supp darwin10-drd.supp \ | |
- darwin11.supp darwin12.supp darwin13.supp \ | |
+ darwin11.supp darwin12.supp darwin13.supp darwin14.supp \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
# for url - http://ask.metafilter.com/187877/How-to-download-audio-from-NPR-stream | |
url = 'http://api.npr.org/query?id=1039&fields=titles,audio,show&sort=assigned&apiKey=MDAzMzQ2MjAyMDEyMzk4MTU1MDg3ZmM3MQ010' | |
doc = Nokogiri::XML(open(url)) | |
doc.xpath('//mp3').each do |file| | |
url = file.text.strip | |
if url.include?("/fl/") && url.include?('.mp3') # Is it a "first listen" mp3? |