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
;; Поиск вперед | |
(global-set-key (kbd "M-;") 'isearch-forward) | |
;; Поиск назад | |
(global-set-key (kbd "M-:") 'isearch-backward) | |
;; В режиме поиска добавляем несколько клавиш: | |
;; M-; -- повторить поиск вперед | |
;; M-: -- повторить поиск назад | |
;; M-v -- вставить скопированный текст |
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
(task update-version | |
"Updates version of the software" | |
(start [:shell (str *src-dir* "update-version.sh")]) | |
(stop :kill)) | |
(task run-zookeeper | |
"Runs zookeeper" | |
(depends-on update-version) | |
(start [:shell (str *base-dir* "bin/zookeeper.sh")] | |
[:finish-when :stdout :regexp "\\.started\\."]) |
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 my.core | |
(:require ... | |
[ring.middleware [multipart-params :as mp]])) | |
(defn upload-picture [{:keys [tempfile content-type filename]}] | |
(let [ext (.substring content-type (inc (.lastIndexOf content-type "/"))) | |
id (:id (session/get :user))] | |
(if (or (nil? tempfile) | |
(nil? id)) |
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
(defun string/starts-with (s arg) | |
(cond ((>= (length s) (length arg)) | |
(string-equal (substring s 0 (length arg)) arg)) | |
(t nil))) | |
(defun chomp (str) | |
(while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'" | |
str) | |
(setq str (replace-match "" t t str))) | |
str) |
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 laser-test.core | |
(:require [me.raynes.laser :as l] | |
[clojure.java.io :refer [file]] | |
[hickory.zip :refer [hickory-zip]])) | |
(def html (l/parse (file "test1.html"))) | |
(println | |
(l/document html) | |
) |
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 lection03.core) | |
;; Eval | |
(eval '(+ 1 2)) | |
(defn my-pre-macro1 [a b] | |
(eval (list '+ a b))) | |
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 lection02.core) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Namespaces | |
;; Refer | |
;;--------------- | |
(comment |
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
fseq :: Integer -> Integer | |
fseq n | n == 0 = 1 | |
| n == 1 = 2 | |
| n > 2 = 3 * fseq (n - 1) | |
| otherwise = error "Unknown argument" |
This file has been truncated, but you can view the full file.
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
var COMPILED = false; | |
var goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = true; | |
goog.LOCALE = "en"; | |
goog.evalWorksForGlobals_ = null; | |
goog.provide = function(name) { | |
if(!COMPILED) { | |
if(goog.getObjectByName(name) && !goog.implicitNamespaces_[name]) { | |
throw Error('Namespace "' + name + '" already declared.'); |
This file has been truncated, but you can view the full file.
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
var COMPILED = false; | |
var goog = goog || {}; | |
goog.global = this; | |
goog.DEBUG = true; | |
goog.LOCALE = "en"; | |
goog.evalWorksForGlobals_ = null; | |
goog.provide = function(name) { | |
if(!COMPILED) { | |
if(goog.getObjectByName(name) && !goog.implicitNamespaces_[name]) { | |
throw Error('Namespace "' + name + '" already declared.'); |