Skip to content

Instantly share code, notes, and snippets.

//
// TWCPixelBufferFrame.swift
//
// Created by Justin Balthrop on 5/2/16.
//
import UIKit
class TWCPixelBufferFrame: TWCI420Frame {
var pixelBuffer: CVPixelBuffer
func acceptAutocomplete() {
if textView.isFirstResponder() {
textView.hidden = true
dummyTextView.becomeFirstResponder()
textView.becomeFirstResponder()
textView.hidden = false
}
}
diff --git a/src/cljs/cljs/core.cljs b/src/cljs/cljs/core.cljs
index 9124abc..1deb8b2 100644
--- a/src/cljs/cljs/core.cljs
+++ b/src/cljs/cljs/core.cljs
@@ -556,7 +556,10 @@
IEquiv
(-equiv [o other]
(and (instance? js/Date other)
- (identical? (.toString o) (.toString other)))))
+ (identical? (.toString o) (.toString other))))
(prn (hash #inst "2014-03-24T00:20:31.858-00:00")) ; 1
(prn (hash #inst "2014-03-24T00:20:31.858-00:00")) ; 2
@ninjudd
ninjudd / gist:7800632
Last active December 30, 2015 08:09
5000 concurrent requests with a thread pool of 50 using ring-async!
fallout:ring-async master$ lein test
Retrieving com/ninjudd/ring/1.2.2/ring-1.2.2.pom from clojars
Retrieving com/ninjudd/ring/1.2.2/ring-1.2.2.jar from clojars
lein test ring.middleware.async-test
2013-12-04 21:40:01.032:INFO:oejs.Server:jetty-7.6.8.v20121106
2013-12-04 21:40:01.056:INFO:oejs.AbstractConnector:Started [email protected]:7700
Ran 1 tests containing 5000 assertions.
0 failures, 0 errors.
lein test flatland.phonograph-test
lein test :only flatland.phonograph-test/below-density
FAIL in (below-density) (phonograph_test.clj:92)
expected: (= 20 (:until r))
actual: (not (= 20 15))
lein test :only flatland.phonograph-test/below-density
if Rails.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel)
# Pulled right from latest rack. Old looked like this in 1.1.0 version.
#
# def [](k)
# super(@names[k] ||= @names[k.downcase])
# end
#
module Rack
@ninjudd
ninjudd / match.clj
Created December 6, 2012 23:05
clojure.core.match bug?
(require '[clojure.core.match :refer [match]])
(defn edge-keyseq-id [keyseq]
(match keyseq
[_ :edges edge-id & _] edge-id))
(edge-keyseq-id ["foo" :edges "bar"])
;; => "bar"
(edge-keyseq-id ["foo" "bar"])
(defn extract-dependencies
"Extract all files proto depends on into dest."
[project proto-path protos dest]
(in-project (dissoc project :prep-tasks)
[proto-path (.getPath proto-path)
dest (.getPath dest)
protos protos]
(require '[clojure.java.io :as io]))
(letfn [(dependencies [proto-file]
(when (.exists proto-file)
(letfn [(merge-in* [a b]
(if (map? a)
(merge-with merge-in* a b)
b))]
(defn merge-in
"Merge multiple nested maps."
[& args]
(reduce merge-in* nil args)))