Skip to content

Instantly share code, notes, and snippets.

@vxe
vxe / clrs-by-page.org
Created August 23, 2018 21:24
clrs org file

DFT 9 , 909

INSERTION-SORT 18 , 26 , 208

MERGE 31

BUBBLESORT 40

FIND-MAX-CROSSING-SUBARRAY 71

FIND-MAXIMUM-SUBARRAY 72

SQUARE-MATRIX-MULTIPLY 75 689

SQUARE-MATRIX-MULTIPLY-RECURSIVE 77

HIRE-ASSISTANT 115

BIASED-RANDOM 117

@vxe
vxe / clrs.org
Created August 23, 2018 02:06
r

ABOVE 1024

ADD-SUBARRAY 805

ALLOCATE-NODE 492

ALLOCATE-OBJECT 244

ANY-SEGMENTS-INTERSECT 1025

APPROX-MIN-WEIGHT-VC 1126

APPROX-SUBSET-SUM 1131

APPROX-TSP-TOUR 1112

APPROX-VERTEX-COVER 1109

AVL-INSERT 333

---
- name: install applications
hosts: localhost
tasks:
# setup crontabs
# - name: "run ansible playbooks"
# cron: name="crontab generate crontabs" minute="20" user="vedwin" job="/Users/vedwin/etc/ansible/bin/run-playbook"
# - name: "brew update"
# cron: name="crontab brew update" minute="0" hour="13" user="vedwin" job="/usr/local/bin/brew update"
# install brew dependencie
@vxe
vxe / gist:2a4edac0d0ad5474a9b7278549aec83f
Created June 29, 2018 02:45
clj-refactor stacktrace
Debugger entered--Lisp error: (error "Error in nrepl-refactor: java.util.concurrent.ExecutionException: refactornrepl240SNAPSHOT.com.fasterxml.jackson.core.JsonParseException: Unexpected character (’<’ (code 60)): expected a valid value (number, String, array, object, ’true’, ’false’ or ’null’)
at [Source: (StringReader); line: 1, column: 2]
at java.util.concurrent.FutureTask.report (FutureTask.java:122)
java.util.concurrent.FutureTask.get (FutureTask.java:192)
clojure.core$deref_future.invokeStatic (core.clj:2292)
clojure.core$future_call$reify__8097.deref (core.clj:6894)
clojure.core$deref.invokeStatic (core.clj:2312)
clojure.core$deref.invoke (core.clj:2298)
clojure.core$map$fn__5587.invoke (core.clj:2747)
clojure.lang.LazySeq.sval (LazySeq.java:40)
@vxe
vxe / org-eww.el
Created February 28, 2018 03:34
org-eww
;;; org-eww.el --- Store url and kill from Eww mode for Org -*- lexical-binding: t -*-
;; Copyright (C) 2014-2016 Free Software Foundation, Inc.
;; Author: Marco Wahl <marcowahlsoft>a<gmailcom>
;; Keywords: link, eww
;; Homepage: http://orgmode.org
;;
;; This file is not part of GNU Emacs.
;;
@vxe
vxe / synonyms.el
Created February 12, 2018 00:23
synonyms.el
;;; synonyms.el --- Look up synonyms for a word or phrase in a thesaurus.
;;
;; Filename: synonyms.el
;; Description: Look up synonyms for a word or phrase in a thesaurus.
;; Author: Drew Adams
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
;; Copyright (C) 2005-2018, Drew Adams, all rights reserved.
;; Created: Tue Dec 20 14:39:26 2005
;; Version: 0
;; Package-Requires: ()
;;; org-mime.el --- org html export for text/html MIME emails
;; Copyright (C) 2010-2015 Eric Schulte
;; Author: Eric Schulte
;; Keywords: mime, mail, email, html
;; Homepage: http://orgmode.org/worg/org-contrib/org-mime.php
;; Version: 0.01
;; This file is not part of GNU Emacs.
@vxe
vxe / Dockerfile.clasp
Created June 29, 2017 04:29
rather ugly docker image for running clasp
FROM ubuntu:xenial
MAINTAINER Vijay Edwin
WORKDIR /root
# add LLVM repo
RUN apt-get -y update && apt-get -y install wget && apt-get clean
RUN wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add -
RUN echo 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main'\
>/etc/apt/sources.list.d/llvm4.list
[342/352] Processing dsymutil: build/boehm/iclasp-boehm build/boehm/iclasp-boehm.lto.o -> build/
boehm/iclasp-boehm.dSYM/Contents/Info.plist build/boehm/iclasp-boehm.dSYM/Contents/Resources/DWA
RF/iclasp-boehm
cmd: dsymutil /Users/vedwin/Downloads/tmp/home/clasp/build/boehm/iclasp-boehm
warning: (x86_64) /Users/vedwin/Downloads/tmp/home/clasp/build/boehm/iclasp-boehm.lto.o unable t
o open object file: Is a directory
warning: no debug symbols in executable (-arch x86_64)
[343/352] Compile aclasp using... compile_aclasp
In compile_aclasp /Users/vedwin/Downloads/tmp/home/clasp/build/boehm/iclasp-boehm -> /Users/vedw
[340/352] Linking build/boehm/iclasp-boehm
[341/352] Processing link_bitcode - linking all object(bitcode) files.
/Users/vedwin/src/externals-clasp/build/release/bin/llvm-ar: creating /Users/vedwin/Downloads/tm
p/home/clasp/build/boehm/fasl/boehm-all-cxx.a
clang version 4.0.0 (http://llvm.org/git/clang.git 715c2ef7122c091bc6f5899a6120deb5390a6fac) (ht
tp://llvm.org/git/llvm.git c54021df3fd4d71d822b3112cba4e43d94927378)
Target: x86_64-apple-darwin16.6.0
Thread model: posix