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
package lambdas; | |
import sun.reflect.ConstantPool; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
public class TypeTest { | |
@FunctionalInterface |
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
package org.lnu.is.integration.access | |
import io.gatling.core.Predef.checkBuilder2Check | |
import io.gatling.core.Predef.doIf | |
import io.gatling.core.Predef.exec | |
import io.gatling.core.Predef.findCheckBuilder2ValidatorCheckBuilder | |
import io.gatling.core.Predef.foreach | |
import io.gatling.core.Predef.feed | |
import io.gatling.core.Predef.stringToExpression | |
import io.gatling.core.Predef.validatorCheckBuilder2CheckBuilder |
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
#Pausing all but x CPU-intensive tasks | |
PAUSEQUEUENUM=0 | |
ACTIVEQUEUENUM=0 | |
function putinpausequeue { | |
kill -STOP $1 | |
PAUSEQUEUE="$PAUSEQUEUE $1" | |
PAUSEQUEUENUM=$(($PAUSEQUEUENUM+1)) | |
echo "Notice. I am pausing $1 . The pause queue is now $PAUSEQUEUE" |
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 'pp' | |
class KDTree | |
attr_reader :root | |
attr_reader :points | |
def initialize(points, dim) | |
@dim = dim | |
@root = KDNode.new(dim).parse(points) | |
end |
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 MyPoolSizeCalculator extends PoolSizeCalculator { | |
public static void main(String[] args) throws InterruptedException, | |
InstantiationException, | |
IllegalAccessException, | |
ClassNotFoundException { | |
MyThreadSizeCalculator calculator = new MyThreadSizeCalculator(); | |
calculator.calculateBoundaries(new BigDecimal(1.0), | |
new BigDecimal(100000)); | |
} |
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
#!/bin/sh | |
## --- tunnel_to_master_redis | |
REDIS_MASTER=XYZ | |
REDIS_SLAVE_PORT=6280 | |
AUTOSSH_POLL=300 | |
AUTOSSH_PORT=20000 | |
AUTOSSH_GATETIME=10 | |
AUTOSSH_LOGFILE=/var/log/autossh/autossh.log |
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
''' | |
prefix_code.py | |
Copyright 2012-2013 Josiah Carlson | |
Released under the GNU LGPL v 2.1 license | |
This module offers the ability to encode/decode a sequence of integers into | |
strings that can then be used to compare sequences of integers (or paths on | |
trees) quickly. This module was originally intended to be used in a case- | |
preserving index in a relational database (where 'Z' comes before 'a', as is |
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
votes CF | |
"back in black" => { 201005211200 => '1', 201005201159 => '1', 201005201157 => '1', 201005011900 => '1', 201004190600 => '1' }, | |
"black album" => { 201005021800 => '1', 201005010600 => '1' }, | |
"black star" => { 201005011000 => '1' } | |
cached_counts CF | |
"back in black" => { 'cached_count' => 2, 'counted_until' => 201005011931 }, | |
"black album" => { 'cached_count' => 1, 'counted_until' => 201005010600 } |
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
#!/bin/bash | |
# atlassian-heap-dump.sh - dump a heap using GDB for a crashed application | |
# Accepts a single argument: the PID of the JVM | |
# Author: James Gray (jgray@atlassian.com) | |
# Copyright Atlassian P/L | |
# License: MIT | |
# Are we root? | |
if [ $UID -ne 0 ]; then |
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
package com.developerb.dropbot; | |
import com.developerb.dropbot.instrumentation.MethodInvocationTimingInterceptor; | |
import com.google.inject.AbstractModule; | |
import com.yammer.metrics.annotation.Timed; | |
import static com.google.inject.matcher.Matchers.annotatedWith; | |
import static com.google.inject.matcher.Matchers.any; | |
/** |
OlderNewer