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
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |
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
package org.scalatra.auth | |
import OurImplicits._ | |
import com.mongodb.casbah.Imports._ | |
import org.scalatra.auth.{ScentryConfig, ScentrySupport} | |
import org.scalatra.ScalatraKernel | |
trait AuthenticationSupport extends ScentrySupport[DBObject] with BasicAuthSupport { self: ScalatraKernel => | |
val realm = Config.serviceName |
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
############################################################################## | |
# History Configuration | |
############################################################################## | |
HISTSIZE=5000 #How many lines of history to keep in memory | |
HISTFILE=~/.zsh_history #Where to save history to disk | |
SAVEHIST=5000 #Number of history entries to save to disk | |
#HISTDUP=erase #Erase duplicates in the history file | |
setopt appendhistory #Append history to the history file (no overwriting) | |
setopt sharehistory #Share history across terminals | |
setopt incappendhistory #Immediately append to the history file, not just when a term is killed |
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
import AppKit | |
let app = NSApplication.shared | |
app.setActivationPolicy(.regular) | |
let window = NSWindow( | |
contentRect: NSMakeRect(0, 0, 640, 480), | |
styleMask: [.titled, .closable], | |
backing: .buffered, | |
defer: true |