This file contains 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
// write literal true | |
ByteArrayOutputStream bs1 = new ByteArrayOutputStream(); | |
(new ObjectOutputStream(bs1)).writeObject(true); | |
// write Boolean.TRUE | |
ByteArrayOutputStream bs2 = new ByteArrayOutputStream(); | |
(new ObjectOutputStream(bs2)).writeObject(Boolean.TRUE); | |
// did we write same bytes? yes. | |
System.out.println(Arrays.equals(bs1.toByteArray(), bs2.toByteArray())); // true |
This file contains 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
/var/log/upstart/*.log { | |
daily | |
missingok | |
rotate 7 | |
compress | |
notifempty | |
nocreate | |
} |
This file contains 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
(require '[clj-kafka.core :refer [with-resource]] | |
'[clj-kafka.consumer.zk :as kafka.consumer]) | |
(defn deserialize-message | |
[message] | |
message) | |
(defn production-traffic? | |
[event] | |
true) |
This file contains 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
.classpath: project.clj | |
lein classpath \ | |
| tr ':' '\n' \ | |
| sed '/\.jar/!d' \ | |
> .classpath | |
repl: .classpath | |
@java -cp $(shell cat .classpath | tr '\n' ':') clojure.main -i nrepl.clj -r | |
.PHONY: repl |
This file contains 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
\d+ clickouts | |
Table "public.clickouts" | |
Column | Type | Modifiers | Storage | Stats target | Description | |
------------+-----------------------------+-----------+----------+--------------+------------- | |
click_ref | character varying(36) | not null | extended | | | |
click_date | timestamp without time zone | not null | plain | | | |
deal_id | character varying(40) | not null | extended | | | |
raw_data | jsonb | not null | extended | | | |
user_agent | jsonb | | extended | | | |
Indexes: |
This file contains 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
user=> (doc redis/atomically) | |
------------------------- | |
redis/atomically | |
([& body]) | |
Macro | |
Execute all redis commands in body atomically, ie. sandwiched in a | |
MULTI/EXEC statement. If an exception is thrown the EXEC command | |
will be terminated by a DISCARD, no operations will be performed and | |
the exception will be rethrown. |
This file contains 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
;; | |
;; Implementation of exercise 2 found at: | |
;; http://www.knowing.net/index.php/2006/06/16/15-exercises-to-know-a-programming-language-part-1/ | |
;; | |
;; Part of code sparring evening at the first SCLOJUG meeting, | |
;; unfinished then, finished now. | |
;; | |
;; Horrible specification btw. | |
;; |
This file contains 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
;; Setup Mac keys | |
(setq mac-command-modifier 'meta) | |
(setq mac-option-modifier nil) |
This file contains 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
using System.Messaging; | |
using System.Transactions; | |
using NHibernate.Criterion; | |
using NUnit.Framework; | |
using System.Collections; | |
namespace NHibernate.Test.NHSpecificTest.NH2238 | |
{ |
This file contains 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
public class Group | |
{ | |
[DirectoryAttribute("member")] | |
public IList<string> Members { get; set; } | |
} | |
public class User | |
{ | |
[DirectoryAttribute("objectGUID")] | |
public Guid ObjectGUID { get; set; } |