This file contains hidden or 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 static void main(String[] args) throws Exception { | |
Socket echoSocket = null; | |
PrintWriter out = null; | |
String host = null; | |
int port = 0; | |
while (true) { | |
try { |
This file contains hidden or 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
#!/bin/bash | |
# Copyright (c) 2010, 2011 Benoit Sigoure. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# - Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# - Redistributions in binary form must reproduce the above copyright notice, | |
# this list of conditions and the following disclaimer in the documentation | |
# and/or other materials provided with the distribution. |
This file contains hidden or 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
/* | |
This is for https://github.com/nkallen/querulous/issues/24 | |
I must be doing something wrong but I can't see what. In my loadtests it's pretty apparent | |
that new MySQL connections are always created all the time and are never re-used, so my app | |
then runs out of FD. | |
*/ | |
package whatever | |
import java.sql.ResultSet |
This file contains hidden or 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
#!/usr/bin/python | |
# Copyright (c) 2011 StumbleUpon, Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# - Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# - Redistributions in binary form must reproduce the above copyright notice, | |
# this list of conditions and the following disclaimer in the documentation | |
# and/or other materials provided with the distribution. |
This file contains hidden or 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
/*./re2/prog.h:100*/ 0x0000000000411f0b <+523>: mov 0x50(%rbx),%rdi # rdi = visited_ | |
/*./re2/prog.h:100*/ 0x0000000000411f0f <+527>: add $0x1,%edx # edx = text_.size() + 1 | |
/*re2/bitstate.cc:97*/ 0x0000000000411f12 <+530>: imul %esi,%edx # esi = id, edx = id * (text_.size() + 1) | |
/*re2/bitstate.cc:97*/ 0x0000000000411f15 <+533>: add %r14d,%edx # r14d = p, edx = id * (text_.size() + 1) + p | |
/*re2/bitstate.cc:97*/ 0x0000000000411f18 <+536>: sub %eax,%edx # eax = text_.begin(), edx = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1a <+538>: mov %edx,%eax # eax = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1c <+540>: mov %edx,%ecx # ecx = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1e <+542>: shr $0x5,%eax # eax = n >> 5 = n / VisitedBits | |
/*re2/bitstate.cc:98*/ 0x0000000000411f21 <+545>: and $0x1f,%ecx # ecx = n & (VisitedBits - 1) | |
/*re2/bitstate.cc:98*/ 0x0000000000411f24 <+548>: mov |
This file contains hidden or 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
#!/usr/bin/perl -w | |
# | |
# The contents of this file are subject to the Mozilla Public | |
# License Version 1.1 (the "License"); you may not use this file | |
# except in compliance with the License. You may obtain a copy of | |
# the License at http://www.mozilla.org/MPL/ | |
# | |
# Software distributed under the License is distributed on an "AS | |
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
# implied. See the License for the specific language governing |
This file contains hidden or 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
#!/usr/bin/env python | |
import socket | |
import subprocess | |
import sys | |
import time | |
COLLECTION_INTERVAL = 15 # seconds |
This file contains hidden or 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
diff --git a/src/core/TsdbQuery.java b/src/core/TsdbQuery.java | |
index 2edd53c..8776e89 100644 | |
--- a/src/core/TsdbQuery.java | |
+++ b/src/core/TsdbQuery.java | |
@@ -401,7 +401,8 @@ final class TsdbQuery implements Query { | |
// but this doesn't really matter. | |
// Additionally, in case our sample_interval is large, we need to look | |
// even further before/after, so use that too. | |
- return getStartTime() - Const.MAX_TIMESPAN * 2 - sample_interval; | |
+ final long t = getStartTime() - Const.MAX_TIMESPAN * 2 - sample_interval; |
This file contains hidden or 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
#!/usr/bin/python | |
import httplib | |
import json | |
import os | |
import shutil | |
import time | |
def purge_tsd_cache(): | |
for dir in (dir for dir in os.listdir("/tmp/tsd") if dir[0] != "."): |
This file contains hidden or 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
From 7a538914c93f8a92b9c80e5c533e73d97e8423c8 Mon Sep 17 00:00:00 2001 | |
From: Benoit Sigoure <[email protected]> | |
Date: Thu, 27 Jan 2011 17:33:37 -0800 | |
Subject: [PATCH] Add support for HBase 0.90. | |
In order to enable the new code, the JVM must be given the following | |
system property in argument: | |
-Dorg.hbase.async.v0.90 | |
For HBASE-3174, revision r1029115 (or 08e64aae in Git) changed the |