Skip to content

Instantly share code, notes, and snippets.

;; Поиск вперед
(global-set-key (kbd "M-;") 'isearch-forward)
;; Поиск назад
(global-set-key (kbd "M-:") 'isearch-backward)
;; В режиме поиска добавляем несколько клавиш:
;; M-; -- повторить поиск вперед
;; M-: -- повторить поиск назад
;; M-v -- вставить скопированный текст
(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\\."])
(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))
(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)
(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)
)
(ns lection03.core)
;; Eval
(eval '(+ 1 2))
(defn my-pre-macro1 [a b]
(eval (list '+ a b)))
@dbushenko
dbushenko / gist:5220377
Created March 22, 2013 10:32
Clojure Course Lection 02
(ns lection02.core)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Namespaces
;; Refer
;;---------------
(comment
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.
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.
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.');