Skip to content

Instantly share code, notes, and snippets.

@dimiro1
dimiro1 / calculator.thrift
Last active December 30, 2015 20:37
Implementation of the Thrift Servlet with Clojure Ring/compojure - A Working example https://github.com/dimiro1/thrift-clojure-example
service Calculator {
i64 sum(1: i64 a, 2: i64 b)
}
@skvark
skvark / edison_flashing_wifi.md
Last active February 9, 2022 08:48
Flashing Intel Edison using only serial connection and wifi

Do this at your own risk. I take no responsibility for any damage caused to your board.

My Intel Edison was shipped to me with old and buggy version of the Yocto Linux image. I purchased only the console block via Sparkfun (which has only one USB port connected to UART2 (serial connection) of the Edison therefore it's not connected to the actual USB on Edison) so I could not update to a new build the normal way.

I assume you have successfully connected to the Edison via the serial connection and can use the linux console on Edison.

  1. Connect the Edison into a local WiFi network with configure_edison --wifi
  2. Check that you can access to the Edison via SSH or with browser
    • if you can't, vi /etc/systemd/system/basic.target.wants/network-gadget-init.service and change the ip addresses to i.e 192.168.99.15
  3. On Edison, cd /
@ptaoussanis
ptaoussanis / smart_memoize.clj
Created June 14, 2012 11:19
More powerful memoize for Clojure
(def ^:private gc-sm-cache!
"Maintains maximum cache size by intelligently pruning less valuable items."
(let [gc-running? (atom false)]
(fn [cache ttl max-items now]
(when-not @gc-running?
(reset! gc-running? true)
(let [snapshot @cache