Skip to content

Instantly share code, notes, and snippets.

View iwillig's full-sized avatar

Ivan Willig iwillig

View GitHub Profile
(ns redis
(:import (redis.clients.jedis Jedis)
(redis.clients.jedis JedisPubSub)
(redis.clients.jedis Pipeline)))
(set! *warn-on-reflection* true)
;;;; jedis.sadd("planets", "Venus");
;; Pipeline p = jedis.pipelined();
;; p.set("fool", "bar");
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(defn file? [x] (instance? java.io.File x))
(defn multipart? [params]
(every?
(fn [x]
(cond
(file? x) true
(map? x) (some file? (vals x))
:else false))
ivan1@Ivans-MBP> make repl ~/dev/clubhouse/cli
rlwrap java -cp cljs.jar:src clojure.main repl.clj
Reading analysis cache for jar:file:/Users/ivan1/dev/clubhouse/cli/cljs.jar!/cljs/core.cljs
Compiling src/cli/core.cljs
Reading analysis cache for jar:file:/Users/ivan1/dev/clubhouse/cli/cljs.jar!/cljs/nodejs.cljs
Compiling out/cljs/nodejs.cljs
ClojureScript Node.js REPL server listening on 49293
Watch compilation log available at: out/watch.log
To quit, type: :cljs/quit
ClojureScript:cljs.user> (require '[cljs.nodejs :as node])
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="/node_modules/source-map/dist/source-map.js"></script>
<script src="/web-worker-report.js"></script>
<script>
/*jshint node: true */
var sourceMap = require('source-map'),
fs = require('fs');
function main() {
var newMapping = new sourceMap.SourceMapGenerator();
var source = new sourceMap.SourceMapConsumer(require('./tangram.debug.js.map.json'));
/*
{
"version": 3,
"sources": [
"/home/ivan/dev/mapzen/tangram/node_modules/browserify/node_modules/browser-pack/_prelude.js",
"/home/ivan/dev/mapzen/tangram/node_modules/gl-matrix/dist/gl-matrix.js",
"/home/ivan/dev/mapzen/tangram/node_modules/queue-async/queue.js",
"/home/ivan/dev/mapzen/tangram/src/geo.js",
"/home/ivan/dev/mapzen/tangram/src/gl/gl.js",
"/home/ivan/dev/mapzen/tangram/src/gl/gl_builders.js",
"/home/ivan/dev/mapzen/tangram/src/gl/gl_geom.js",
> 0 == '0'
true
> '0' == 0
true
> '' == 0
true
> false == ''
true
> false == '0'
true
HAMAS--RELATIONSHIP WITH ISRAEL
-------------------------------
20. MANY WEST BANKERS BELIEVE THAT ISRAEL
ACTIVELY SUPPORTS HAMAS IN AN EFFORT TO DIVIDE
PALESTINIANS AND WEAKEN THE INTIFADA. THEY
POINT TO THE FACT THAT HAMAS OPERATIVES ACT
BOLDLY IN DISTRIBUTING THEIR LEAFLETS.
SHOPKEEPERS IN JERUSALEM AND NABLUS REPORT THAT,
WHEREAS UNLU LEAFLETS ARE DISTRIBUTED SECRETLY
FOR FEAR OF ISRAELI SECURITY FORCES, HAMAS
(defn member? [a lat]
(if (empty? lat) false
(or (= (first lat) a)
(recur a (rest lat)))))