Skip to content

Instantly share code, notes, and snippets.

View AlexBaranosky's full-sized avatar

AlexBaranosky AlexBaranosky

  • Cisco Secure Malware Analytics (formerly Threat Grid)
  • Massachusetts
  • 01:40 (UTC -05:00)
View GitHub Profile
@AlexBaranosky
AlexBaranosky / threatgrid_job_listing.md
Last active December 18, 2017 23:57
threatgrid_job_listing.md

[ Full disclosure: I am the technical lead on this product and the hiring manager in this case. Feel free to contact me with questions, and to pass this around. ]

Clojure Developer for Malware Analysis Product

The ThreatGRID team at Cisco is looking for experienced clojure developers to work on our large scale, malware analysis product. Our entire platform is built on Clojure, from the the API services, around the event processing subsystem, and down to the core.logic analysis engine.

Our system runs as a distributed cluster in the cloud, and shrunk down to a

(clojure.core/getLookupThunk
[this__6431__auto__ k__6432__auto__]
(let [gclass (class this__6431__auto__)]
(case
k__6432__auto__
:events2
(reify
clojure.lang.ILookupThunk
(get
[thunk gtarget]
@AlexBaranosky
AlexBaranosky / gist:bdf9a25ecaf5162a6529
Last active March 3, 2016 23:55
remove scientific notation for floats
(defn drop-trailing-zeros [^String s]
(.replaceFirst s "\\.0*$|(\\.\\d*?)0+$" "$1"))
(defmethod print-method Number [o, ^Writer w]
(if (float? o)
(.write w (drop-trailing-zeros (format "%.99f" o)))
(.write w (str o))))
@AlexBaranosky
AlexBaranosky / threatgrid_jobs.md
Created October 22, 2015 17:04
Threatgrid Job Listings

Intro

The Advanced Threat Integration Team in Cisco's Security Business Group is building a global scale, multi-product security platform with an emphasis on Threat Intelligence and Incident Response support.

Our system runs as a distributed cluster in the cloud, and shrunk down to a single on-premises appliance. This keeps us focused on simple solutions, clear abstractions between services, composition of

;; ALERT ALERT -- don't use this, it's busted code!
(defn catch-form? [form]
(and (list? form)
(= 'catch (first form))))
(defn transform-catch-form [catch-form]
(if-not (sequential? (second catch-form))
catch-form
(let [[_catch [k v] e & catch-body] catch-form]
(defun change-to-wfoo-mode ()
(interactive)
(cond ((eq major-mode 'dired-mode)
(wdired-change-to-wdired-mode))
((eq major-mode 'grep-mode)
(wgrep-change-to-wgrep-mode))
(t
(message "Not in either dired-mode or grep-mode :("))))
@AlexBaranosky
AlexBaranosky / gist:e9332c2f3387297dd05c
Created January 19, 2015 23:14
Learn a ton about magit
git clone https://github.com/magit/magit
cd magit
makeinfo --html magit.texi ## you may need to open the texi file and delete the encoding line at the top
open magit/index.html
;; Copied from:
;; https://github.com/davidsantiago/hickory/blob/6c02f7e5383549906855246358a15f3e0dcd3264/src/hickory/core.cljs#L69
;;
;; .. with one small modification commented inline. SEE: hickory/Text
;; Original modified line:
;; https://github.com/davidsantiago/hickory/blob/6c02f7e5383549906855246358a15f3e0dcd3264/src/hickory/core.cljs#L95
(extend-protocol hickory/HiccupRepresentable
object
(as-hiccup [this]
(condp = (aget this "nodeType")
@AlexBaranosky
AlexBaranosky / gist:f34a9988990b64186512
Created January 16, 2015 18:15
html escaping question for Kioo
(def text "<p>&lt;maybe&gt;. This is new. ' !@#$%^&amp;*(){}/=?+[]’</p>")
(html-content text)
;; desired output on UI:
;; <maybe>. This is new. ' !@#$%^&*(){}/=?+[]’
;; actual output on UI:
;; &lt;maybe&gt;. This is new. &#39; !@#$%^&amp;*(){}/=?+[]’
(defn update-in-wildcard
[m [k & ks] f & args]
(if ks
(reduce (fn [m k]
(assoc m k (apply update-in-wildcard (get m k) ks f args)))
m
(if (= k :*)
(if (vector? m)
(range 0 (count m))
(keys m))