Skip to content

Instantly share code, notes, and snippets.

Rovanion Luckey Rovanion

Block or report user

Report or block Rovanion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rewrite-history.sh
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="a@example.com
CORRECT_NAME="a"
@Rovanion
Rovanion / utils.ts
Created Apr 17, 2018
A semitransparent print or log function for TypeScript or JavaScript
View utils.ts
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[]) {
@Rovanion
Rovanion / cyd.liu.se
Created Sep 6, 2017
Nginx-conf for CYD
View cyd.liu.se
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;
}
@Rovanion
Rovanion / assert.clj
Created Jun 30, 2017
Modified spec/assert for improved error reporting
View assert.clj
(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
@Rovanion
Rovanion / key-count.dat
Last active Jun 1, 2017
The number of times different leiningen project map keywords are used
View key-count.dat
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
@Rovanion
Rovanion / fn-specs.clj
Created May 3, 2017
Useful function specs for Clojure Spec
View fn-specs.clj
(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?)
@Rovanion
Rovanion / test-clojar-projects.clj.bash
Last active Mar 7, 2017
Fetches all projects from clojure-toolbox.com and runs lein-master on them, define lein-master in your PATH for this to work.
View test-clojar-projects.clj.bash
#!/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
View gist:9462490
\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}
@Rovanion
Rovanion / easylist.sty
Last active Dec 23, 2015
Small fix for easylist
View easylist.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% easylist.sty v.1.3 by Paul Isambert %%
%% See the documentation for a comment on the implementation. %%
%% %%
%% This set of macros is published under the LaTeX Project Public License. %%
%% %%
%% Comments, suggestions and bugs: %%
%% %%
%% zappathustra@free.fr %%
View snapshot.sh
#!/bin/bash
LOGG=/home/fille/Loggar/snapshots.txt
touch $LOGG
exec >> $LOGG 2>&1
DATE=$(date +%Y%m%d)
echo ""
echo "Written by snapshot.sh"
echo "-------------------------"
You can’t perform that action at this time.