Skip to content

Instantly share code, notes, and snippets.

@Rich86man
Rich86man / NSNotificationCenterExtensions.swift
Last active November 3, 2017 21:50 — forked from jverkoey/NSNotificationCenterExtensions.swift
NSNotificationCenter extension for safe Swift instance method support
/*
Copyright (c) 2011-present, NimbusKit. All rights reserved.
This source code is licensed under the BSD-style license found at http://nimbuskit.info/license
Extracted from NimbusKit: Swift Edition at https://github.com/nimbuskit/swift
*/
extension NSNotificationCenter {
/**
@Rich86man
Rich86man / import.rake
Last active August 29, 2015 14:19 — forked from abstractcoder/import.rake
Import heroku database
namespace :db do
desc "Backs up heroku database and restores it locally"
task clong: :environment do
# Load the current environments database config
c = Rails.configuration.database_configuration[Rails.env]
# This gets around an issue with the Heroku Toolbelt
# https://github.com/sstephenson/rbenv/issues/400#issuecomment-18742700
# https://github.com/sstephenson/rbenv/issues/400#issuecomment-18744931
Bundler.with_clean_env do
tell application "Notes"
set theNotes to every note of the folder "Notes"
repeat with thisNote in theNotes
set myTitle to the name of thisNote
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
tell application "Evernote"
create note with html myText ¬
title myTitle ¬
created myCreateDate ¬