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
// please check https://github.com/bademux/robolectric-java-gradle-plugin instead | |
//build.gradle | |
//fixes AndroidStudion<>Robolectric integration | |
//fixes 'java.lang.RuntimeException: Stub!' and 'NoClassDefFoundError' | |
gradle.projectsEvaluated { | |
def imlFile = file(project.name + '.iml') | |
def parsedXml; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# License: MIT | |
# copy file to ~/.gimp-2.8/plug-ins and make it executeble, then run gimp with comdline | |
# gimp -ib '(python-wim RUN-NONINTERACTIVE "mytemplate.xcf" "guest_list.txt" "outdir")''(gimp-quit 0)' | |
import os, re, glob | |
from gimpfu import * | |
from gimpenums import * |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# License: MIT | |
#quick and dirty image merger | |
#gimp -ib '(python-copy2a4 RUN-NONINTERACTIVE "~/pics" "inv_*.png" "~/pics")''(gimp-quit 0)' | |
import os, re, glob | |
from gimpfu import * | |
from gimpenums import * | |
# our script |
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
// predicates filter to extjs query format | |
//usage put in html <input st-search="like['test.text']"> | |
//then parse SmartTable's tableState var criteria = queryParserFilter(tableState); | |
myModule | |
.filter('queryParser', function () { | |
return function (tableState) { | |
var criteria = { | |
start: tableState.pagination.start, | |
limit: tableState.pagination.number | |
}; |
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
@Configuration | |
public class JacksonConfig { | |
//TODO: Autoscan | |
final static Map<Class<?>, Class<?>> mixins = ImmutableMap.<Class<?>, Class<?>>builder() | |
.put(..., ...) | |
.build(); | |
@Autowired | |
EntityManagerFactory emf; |
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
@Parameterized.UseParametersRunnerFactory(SpringJUnit4ClassRunnerFactory.class) | |
@RunWith(Parameterized.class) | |
@SpringTestConfiguration | |
@Transactional | |
public class StringParametrizedIntegrationTest { | |
@Parameterized.Parameter | |
public String uri; | |
@Parameterized.Parameters(name = "{index}: for {0} ") |
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
@Parameterized.UseParametersRunnerFactory(MockitoClassRunnerFactory.class) | |
@RunWith(Parameterized.class) | |
public class JobServiceSetStatusCheckIsManualTest { | |
@Parameterized.Parameter | |
public State state; | |
@Parameterized.Parameters(name = "{index}: expected {0}") | |
public static Collection<?> data() { | |
return Arrays.asList(new Object[][]{{"test"}}); |
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
class InitDynamoDBConfig{ | |
{ | |
ConversionSchema schema = v2CompatibleBuilder("v2CompatibleWithUuidAsByteBuffer") | |
.addFirstType(UUID.class, UUIDToByteBuffer.Marshaller.instance(), UUIDToByteBuffer.Unmarshaller.instance()) | |
.build() | |
DynamoDBMapperConfig config = new DynamoDBMapperConfig.Builder() | |
.withConversionSchema(schema) | |
.withTableNameResolver(tableNameResolver) | |
.build(); |
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
#!/usr/bin/env bash | |
available () { | |
command -v $1 >/dev/null 2>&1 | |
} | |
# Make sure we have wget or curl | |
if available wget; then | |
SILENT_DL="wget -qO-" | |
LOUD_DL="wget" |
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
#!/usr/bin/env python2.7 | |
# Converts uCsim dumps to ihx format https://en.wikipedia.org/wiki/Intel_HEX | |
# 'dch 0xXX 0xXX 16' dumps ROM to multiple rows formated like {adress} {byte 1} ... {byte 16} {ASCI_representation} | |
import argparse | |
import sys | |
NUMBER_OF_BYTES = 16 | |
def parse_arguments(): |
OlderNewer