Table of Contents
Reference sheet by topic: http://ndpsoftware.com/git-cheatsheet.html
#!/bin/sh | |
# Usage: | |
# start_wait <modulename> <servername> | |
# Default vals for args | |
# http://stackoverflow.com/questions/9332802/how-to-write-a-bash-script-that-takes-optional-input-arguments | |
TIMEOUT=90 |
package myrx; | |
import org.junit.Test; | |
import rx.Observable; | |
import rx.Producer; | |
import rx.Subscriber; | |
import rx.exceptions.Exceptions; | |
import rx.functions.Func1; | |
import rx.plugins.RxJavaPlugins; |
<!-- | |
compile java 1.8, target java 1.7 | |
--> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.3</version> | |
<configuration> | |
<encoding>utf-8</encoding> | |
<source>1.8</source> |
<?xml version="1.0" encoding="utf-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>@@GROUPID@@</groupId> | |
<artifactId>@@ARTIFACTID@@</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<description> | |
A default pom template - use for | |
- set file encoding |
@Rule | |
public WireMockRule wireMockRule = new WireMockRule(wireMockConfig() | |
.port(0) | |
.trustStorePath("/path/to/my/keystore.jks") | |
.trustStorePassword("changeit") | |
) { | |
{ | |
enableRecordMappings(); | |
} | |
{ | |
"priority": 10, | |
"request": { | |
"method": "ANY", | |
"urlPattern": ".*" | |
}, | |
"response": { | |
"proxyBaseUrl" : "https://other.com", | |
"additionalProxyRequestHeaders": { | |
"Accept-Encoding": "identity" |
@Test | |
public void fetch_something() throws Exception { | |
URI uri = UriBuilder.fromPath(path) | |
.resolveTemplates(ImmutableMap.<String, Object>builder() | |
.put("country", VALID_COUNTRY) | |
.put("language", VALID_LANGUAGE) | |
.build() | |
) | |
.build(); |
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>sample-resttemplate</artifactId> | |
<groupId>com.github.eeichinger.blogs</groupId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> |
#!/usr/bin/env python | |
# from https://github.com/sjitech/mac_list_windows_pids/blob/master/lswin.py | |
# requires Quartz framework installed | |
# $pip install pyobjc-framework-Quartz | |
import Quartz | |
#wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionOnScreenOnly | Quartz.kCGWindowListExcludeDesktopElements, Quartz.kCGNullWindowID) | |
wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionAll, Quartz.kCGNullWindowID) |
Reference sheet by topic: http://ndpsoftware.com/git-cheatsheet.html