#VIM Shortcuts
##How to Exit
Command | Description |
---|---|
:q[uit] | Quit Vim. This fails when changes have been made. |
:q[uit]! | Quit without writing. |
:cq[uit] | Quit always, without writing. |
:wq | Write the current file and exit. |
;; depends on [org.imgscalr/imgscalr-lib "4.2"] | |
(ns XXX.image | |
(:refer-clojure :exclude [read]) | |
(:require [clojure.java.io :as io]) | |
(:import [org.imgscalr Scalr Scalr$Method Scalr$Mode] | |
[java.awt Image] | |
[java.awt.image RenderedImage BufferedImageOp] | |
[javax.imageio ImageIO ImageWriter ImageWriteParam IIOImage] |
(import 'java.security.MessageDigest | |
'java.math.BigInteger) | |
(defn md5 [s] | |
(let [algorithm (MessageDigest/getInstance "MD5") | |
size (* 2 (.getDigestLength algorithm)) | |
raw (.digest algorithm (.getBytes s)) | |
sig (.toString (BigInteger. 1 raw) 16) | |
padding (apply str (repeat (- size (count sig)) "0"))] | |
(str padding sig))) |
#VIM Shortcuts
##How to Exit
Command | Description |
---|---|
:q[uit] | Quit Vim. This fails when changes have been made. |
:q[uit]! | Quit without writing. |
:cq[uit] | Quit always, without writing. |
:wq | Write the current file and exit. |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |