Skip to content

Instantly share code, notes, and snippets.

@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: ()
@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 / 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)
---
- 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 / 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

@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-alpha.txt
Last active September 6, 2018 10:18
clrs algorithms
ABOVE
ADD-SUBARRAY
ALLOCATE-NODE
ALLOCATE-OBJECT
ANY-SEGMENTS-INTERSECT
APPROX-MIN-WEIGHT-VC
APPROX-SUBSET-SUM
APPROX-TSP-TOUR
APPROX-VERTEX-COVER
AVL-INSERT
(defproject alert-ranker "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.8.0"]
[metosin/compojure-api "1.1.11"]
[ring/ring-core "1.6.3"]
[ring/ring-jetty-adapter "1.6.3"]
[ring/ring-devel "1.6.3"]
[ring/ring-json "0.4.0"]
[ring-middleware "0.1.0-SNAPSHOT"]
;; project deps
@vxe
vxe / log4j.properties
Created August 26, 2018 22:30
log4j clojure
log4j.rootLogger=INFO, stdout, R
# stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d][%p][%c] %m%n
# log file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=./var/log/kep-list.log
log4j.appender.R.MaxFileSize=100KB
@vxe
vxe / ansible-install-roles.txt
Created September 6, 2018 10:16
ansible install roles
ansible-galaxy install -p ./roles -r roles.yml