This file contains hidden or 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
$(shell $(MAKE) -qp -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | grep $(shell echo $(OUTPUT_FILE) | sed 's|./||') | awk '{ for ( n=1; n<=NF; n++ ) if($$n ~ "[.]o$$") print $$n }') \ |
This file contains hidden or 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 ichramm.log | |
(:require [clojure.tools.logging :as log])) | |
(def ^:macro trace #'log/trace) | |
(def ^:macro debug #'log/debug) | |
(def ^:macro info #'log/info) | |
(def ^:macro warn #'log/warn) | |
(def ^:macro error #'log/error) | |
(def ^:macro fatal #'log/fatal) |
This file contains hidden or 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Matlab code to produce PCA animations shown here: | |
% http://stats.stackexchange.com/questions/2691 | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Static image | |
clear all | |
rng(42) |
This file contains hidden or 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
;; # EMULATING DATOMIC EXCISION VIA MANUAL DATA MIGRATION | |
;; ************************************* | |
;; ## Introduction | |
;; ************************************* | |
;; This Gist demonstrates a generic way to migrate an entire Datomic database | |
;; from an existing 'Origin Connection' to a clean 'Destination Connection', | |
;; while getting rid of some undesirable data and otherwise preserving history. |
This file contains hidden or 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
;; manually | |
(defn compute-common-factor | |
[maps] | |
(if (empty? (rest maps)) | |
;; only one | |
(first maps) | |
(let [head (first maps) | |
maps (rest maps)] | |
(letfn [(reducer [path obj] | |
(reduce-kv (fn [m k v] |
This file contains hidden or 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 components.datomic-registry.service | |
(:require [datomic.api :as d] | |
[components.lifecycle.protocol :as lifecycle] | |
[components.datomic.service :refer [make-uri]] | |
[components.datomic-registry.protocol :as protocol])) | |
(defrecord DatomicRegistryService [db ns-name state] | |
lifecycle/Lifecycle | |
(start [this system] | |
(let [db (lifecycle/handler db) |
This file contains hidden or 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
/*! | |
* \file wireshark_dissector.cpp | |
* \author ichramm | |
* | |
* \date 2020-09-08 | |
*/ | |
#include <iostream> | |
#include "config.h" |
This file contains hidden or 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
sleep $(awk "BEGIN{print 1 + 1 / $(($RANDOM % 5 + 1))}") |
This file contains hidden or 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
(defn index-of | |
[pred coll] | |
(first (keep-indexed #(when (pred %2) %1) coll))) | |
; or | |
(defn indices | |
[pred coll] | |
(keep-indexed #(when (pred %2) %1) coll)) |
This file contains hidden or 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
netsh interface portproxy add v4tov4 listenport=10022 listenaddress=0.0.0.0 connectport=22 connectaddress=192.168.1.1 | |
netsh interface portproxy show all | |
#netsh interface portproxy delete v4tov4 listenaddress=0.0.0.0 listenport=10022 |
NewerOlder