Skip to content

Instantly share code, notes, and snippets.

View genedelisa's full-sized avatar
💭
Feeding the cats

Gene De Lisa genedelisa

💭
Feeding the cats
View GitHub Profile
@genedelisa
genedelisa / gist:354e171c72377f77280c
Last active August 29, 2015 14:03
Set map location from string
self.geocoder.geocodeAddressString("Haddonfield, NJ",
completionHandler: {(placemarks, error:NSError!) in
if error? {
println("Error \(error!.localizedDescription)")
if error!.code == 8 {
println("not found")
}
return
}
@genedelisa
genedelisa / gist:f9d350f0ac90cc079f3d
Created June 30, 2014 23:24
Create a calendar event with alarm
var store:EKEventStore = EKEventStore()
store.requestAccessToEntityType(EKEntityTypeEvent,
completion:{(granted:Bool, error:NSError?) -> Void in
if let e = error {
println("Error \(e.localizedDescription)")
}
if granted {
@genedelisa
genedelisa / main.js
Last active December 13, 2015 19:18
Handle tab selection/activation in jQuery UI 1.10
$(document).ready(function () {
var tabOpts = {
activate: handleTabSelect,
// fx has been deprecated
show: {
height: 'toggle',
opacity: 'toggle'
}
};
@genedelisa
genedelisa / init.el
Created April 27, 2012 17:15
Markdown config in Emacs init.el
;;; Markdown
(defun turn-on-outline-minor-mode ()
(outline-minor-mode 1))
(when (require 'markdown-mode nil 'noerror)
(setq auto-mode-alist
(cons '("\\.md" . markdown-mode) auto-mode-alist))
(setq auto-mode-alist
(cons '("\\.markdown" . markdown-mode) auto-mode-alist))
(setq markdown-command "/usr/local/bin/Markdown.pl")
@genedelisa
genedelisa / init.el
Created April 19, 2012 22:24
A simple init for using Clojure and lein in inferior lisp mode in the Emacs
;; a simple .emacs.d/init.el to set up
;; inferior lisp mode for Clojure with lein
;; this also add Marmalade as a package repository to obtain clojure-mode and paredit
(setq inferior-lisp-program "lein repl")
;; On OSX set the command key to be the meta key
(setq ns-command-modifier 'meta)
(require 'package)