Skip to content

Instantly share code, notes, and snippets.

@wilbeibi
wilbeibi / reeder_starred_to_csv
Last active April 3, 2021 18:10
Export Reeder starred iterms to csv
#!/usr/bin/env python3
import getpass
import sqlite3
import csv
RKIT_PATH = "/Users/" + getpass.getuser() + "/Library/Containers/com.reederapp.rkit2.mac/Data/Library/Application Support/Reeder/rkit/"
conn = sqlite3.connect(RKIT_PATH + "rkit.db")
DATA_DB_PATH = RKIT_PATH + "rkit-data.db"
@wycats
wycats / app.js
Last active February 11, 2016 16:08
App.Router.map(function() {
this.resource('post', { path: '/posts/:post_id' });
});
App.PostRoute = Ember.Route.extend({
model: function(params) {
return this.store.find('post', params.post_id);
}
});
contentArrayContains: function(id, type) {
var contains = null;
Ember.get(type, 'collection').forEach(function(item) {
if (item.get('id') === id) {
contains = item;
}
});
return contains;
#!/usr/bin/env ruby
#------------------------------------------------------------------------------
# Aggregate Print useful information from /proc/[pid]/smaps
#
# pss - Roughly the amount of memory that is "really" being used by the pid
# swap - Amount of swap this process is currently using
#
# Reference:
# http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361
$VERBOSE = nil
require File.expand_path('../rooby', __FILE__)
Person = Rooby::Class.new 'Person' do
define :initialize do |name|
@name = name
end
define :name do