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 tove.specs.generators | |
"Based on https://github.com/dm3/clojure.joda-time/blob/master/test/joda_time/generators.clj" | |
(:require [clojure.test.check.generators :as gen] | |
[clojure.string :as string] | |
#?(:clj [java-time :as jt] | |
:cljs [cljs-time.core :as jst])) | |
#?(:clj (:import [java.time LocalDate LocalDateTime ZonedDateTime] | |
[java.time.chrono IsoChronology]))) | |
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 elisp-showdoc (f) | |
(interactive (list (thing-at-point 'symbol t))) | |
(message | |
"%s" | |
(let* ((doc-list (split-string (documentation (intern f)) "\n")) | |
(number-lines (min (- (floor (* max-mini-window-height (frame-height))) 2) | |
(- (length doc-list) 2))) | |
(subset (concatenate 'list | |
(last doc-list) | |
'("") |
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
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="[email protected] | |
CORRECT_NAME="a" |
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
let fnNameMatcher = /([^(]+)@|at ([^(]+) \(/; | |
function fnName(str: string) { | |
let regexResult = fnNameMatcher.exec(str) as string[]; | |
if (regexResult) { | |
return regexResult[1] || regexResult[2]; | |
} else { return ''; } | |
} | |
export function log(...messages: any[]) { |
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
server { | |
listen 443; | |
server_name cyd.liu.se; | |
include includes/cyd.liu.se-commons; | |
include includes/security; | |
ssl_certificate /etc/ssl/certs/cyd.liu.se.crt; | |
ssl_certificate_key /etc/ssl/private/cyd.liu.se.key; | |
} |
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
(require '[clojure.spec.alpha :as spec]) | |
;;; Spec does not report the name of the predicate when not wrapped in a spec. | |
(spec/assert number? nil) | |
;; Spec assertion failed val: nil fails predicate: | |
;; :clojure.spec.alpha/unknown :clojure.spec.alpha/failure | |
;; :assertion-failed | |
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
count name | |
14697 :description | |
12007 :url | |
136 :mailing-list | |
5 :mailing-lists | |
11641 :license | |
24 :licenses | |
1821 :min-lein-version | |
14154 :dependencies | |
2 :managed-dependencies |
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
(spec/fdef ::predicate | |
:args (spec/cat :arg any?) | |
:ret boolean?) | |
(spec/fdef ::nullary-fn | |
:args (spec/cat) | |
:ret any?) | |
(spec/fdef ::unary-fn | |
:args (spec/cat :first any?) |
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
#!/usr/bin/env bash | |
lst="$(curl -s http://www.clojure-toolbox.com/ \ | |
| sed -n 's/.*href="\([^"]*\).*/\1/p' \ | |
| grep -F 'https://github.com' | sort | uniq)" | |
dir="$PWD" | |
mkdir -p toolbox-projects | |
cd toolbox-projects |
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
\usepackage[utf8]{inputenc} | |
\usepackage[swedish]{babel} | |
\usepackage{url} | |
%\usepackage{fullpage} | |
%\topmargin = 1pt %20pt | |
%\headsep = 25pt %25pt | |
%\usepackage[top=85pt]{geometry} | |
\usepackage[colorlinks=true, linkcolor=black, urlcolor=blue]{hyperref} | |
\usepackage[T1]{fontenc} | |
\usepackage{lmodern} |
NewerOlder