Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| Teacup::Stylesheet.new :main do | |
| style :my_style, | |
| constraints: [ | |
| constrain_left(0), | |
| constrain_width(100), | |
| constrain_top(0), | |
| constrain(:bottom).equals(:superview, :bottom), | |
| ] | |
| end |
| ;; see http://stackoverflow.com/questions/16386793/datomic-query-function-that-filters-and-binds | |
| (require '[datomic.api :as d]) | |
| (def uri "datomic:mem://test") | |
| (d/create-database uri) | |
| (def conn (d/connect uri)) | |
| ;; sample attribute definiton | |
| (d/transact conn [{:db.install/_attribute :db.part/db | |
| :db/id #db/id[:db.part/db] |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.
Terminology:
| #!/usr/bin/env sh | |
| ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}' |
| Zameers-MacBook-Air:~ zmanji$ scala | |
| Welcome to Scala version 2.10.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_17). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> null == null.asInstanceOf[Int] | |
| <console>:8: warning: comparing values of types Null and Int using `==' will always yield false | |
| null == null.asInstanceOf[Int] | |
| ^ | |
| res0: Boolean = true |
| packaging :war | |
| phase :package do | |
| plugin 'de.saumya.mojo:jruby-maven-plugin', '1.0.0-rc3' do | |
| execute_goal( :jruby, | |
| :id => 'pack-war with warbler', | |
| :filename => 'warble', | |
| :gemUseSystem => true ) | |
| execute_goal( :jruby, | |
| :id => 'move war to maven build dir', |
| import java.io.IOException; | |
| import java.util.Properties; | |
| import kafka.server.KafkaConfig; | |
| import kafka.server.KafkaServerStartable; | |
| public class KafkaLocal { | |
| public KafkaServerStartable kafka; | |
| public ZooKeeperLocal zookeeper; |
| (require '[clojure.string :as s]) | |
| ;; My initial attempt | |
| (def c [:0 :1 :2 :3 :4 :5 :6 :7 :8 :9 :A :B :C :D :E :F]) | |
| (str "#" (s/join (map name (repeatedly 6 #(rand-nth c))))) | |
| ;; Another option not using keywords (/ht locks in #clojure) | |
| (def c [0 1 2 3 4 5 6 7 8 9 \A \B \C \D \E \F]) | |
| (str "#" (s/join (repeatedly 6 #(rand-nth c)))) | |
| ;; the last line can be simplified even more (/ht xificurC in #clojure) |
Find it here: https://github.com/bitemyapp/learnhaskell