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
import java.util.regex.Pattern | |
class StringCalculator { | |
def add(String expression) { | |
if (expression.isEmpty()) { | |
return 0 | |
} | |
def delimiter = findCustomDelimiterPattern(expression) |
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.blogspot.toomuchcoding.spock.subjcollabs | |
import com.blogspot.toomuchcoding.spock.subjcollabs.Collaborator | |
import com.blogspot.toomuchcoding.spock.subjcollabs.Subject | |
import spock.lang.Specification | |
class SettersInjectionOnSpySpec extends Specification { | |
public static final String TEST_METHOD_1 = "Test method 1" |
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
$WAS_HOME/bin/wsadmin.sh -lang jython -javaoption "-Dpython.path=/my/jython/modules;/more/jython/modules" | |
source: http://www-01.ibm.com/support/docview.wss?uid=swg21268538 |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName localhost | |
ServerAlias *.localhost | |
LogFormat "%h %l %u %t \"%r\" %>s %b \"X-Language-Locale: %{X-Language-Locale}i\"" international | |
CustomLog "/private/var/log/apache2/international.log" international | |
ErrorLog /private/var/log/apache2/international.log | |
RewriteEngine On | |
RewriteLog /private/var/log/apache2/international.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
# clears SIB queues for the specified bus on a running Websphere instance | |
if len(sys.argv) < 1: | |
print 'Expected argument containing bus name' | |
sys.exit(1) | |
busname = sys.argv[0] | |
queues = AdminControl.queryNames('WebSphere:type=SIBQueuePoint,SIBus='+busname+',*').splitlines() | |
for queue in queues: |
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
ffmpeg -i input.mp4 -strict -2 -acodec aac -ab 160K -ac 2 -ar 44100 -vn output.m4a | |
# -ab audio bitrate | |
# -ac audio channels | |
# -ar audio sample rate | |
# -vn no video | |
# -strict -2 enables AAC codec as it's experimental (ffmpeg 1.0.1) |