When you want to create a webpage with clojure but you're too lazy to use hiccup and garden
- Download shiro-core-1.2.5.jarApache Shiro Downloads
- Download shiro-web-1.2.5.jarApache Shiro Downloads
- Note the location of the JAR files and shiro.ini. I placed it in the root of my Spark download
- Update the spark-env.shfile with the Shiro JARs and add an entry for the path where theshiro.iniresides
- Start the Spark master sbin/start-master.sh
- Navigate to the Spark master dashboard
- Authenticate with credentials in shiro.ini
Note this was developed / tested with Apache Spark 1.4.1, but should work with newer versions as well.
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
  
    
      This file contains hidden or 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/sh | |
| command="${*}" | |
| printf "Initialized REPL for `%s`\n" "$command" | |
| printf "%s> " "$command" | |
| read -r input | |
| while [ "$input" != "" ]; | |
| do | |
| eval "$command $input" | |
| printf "%s> " "$command" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | " Statusline (requires Powerline font) | |
| set statusline= | |
| set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %) | |
| set statusline+=%< " Truncate line here | |
| set statusline+=%f\ " File path, as typed or relative to current directory | |
| set statusline+=%{&modified?'+\ ':''} | |
| set statusline+=%{&readonly?'\ ':''} | |
| set statusline+=%= " Separation point between left and right aligned items | |
| set statusline+=\ %{&filetype!=#''?&filetype:'none'} | |
| set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'') | 
  
    
      This file contains hidden or 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
    
  
  
    
  | (refer-clojure :exclude '[slurp spit]) | |
| (import '[java.awt.datatransfer DataFlavor StringSelection Transferable]) | |
| (defn clipboard [] | |
| (.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))) | |
| (defn slurp [] | |
| (try | |
| (.getTransferData (.getContents (clipboard) nil) (DataFlavor/stringFlavor)) | |
| (catch java.lang.NullPointerException e nil))) | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <!doctype html> | |
| <html> | |
| <head> | |
| <title>uPort Sample App</title> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> | |
| <script src="https://unpkg.com/uport-connect/dist/uport-connect.js"></script> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| main { padding: 10px 30px; } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | const { MongoClient } = require('mongodb'); | |
| const DB_URL = process.env.DB_URL || 'mongodb://localhost:27017'; | |
| const DB_NAME = 'serverless-smoothielicious'; | |
| function errorResponse(callback, err) { | |
| console.error(err); | |
| callback(null, { | |
| statusCode: 500, | 
