Skip to content

Instantly share code, notes, and snippets.

Avatar
🐼
~sad~ happy panda

Guillaume Simard GuiSim

🐼
~sad~ happy panda
  • Capdesk
  • Québec
View GitHub Profile
@GuiSim
GuiSim / Traktor Kontrol S4 MIDI input port 0.djayMidiMapping
Created Jun 12, 2017
Traktor S4 configuration file for DJay Pro
View Traktor Kontrol S4 MIDI input port 0.djayMidiMapping
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>controls</key>
<array>
<dict>
<key>controlType</key>
<string>button</string>
<key>keyPath</key>
View settings.xml
...
<servers>
...
<server>
<id>ossrh</id>
<username>YOUR_OSSRH_JIRA_USER</username>
<password>YOUR_OSSRH_JIRA_PASSWORD</password>
</server>
...
<profiles>
View pom.xml
...
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
View pom.xml
...
<name>${project.groupId}:${project.artifactId}</name>
<description>Your artifact description</description>
<url>Link to your page or GitHub</url>
<licenses>
<license>
<name>MIT License</name>
<url>http://www.opensource.org/licenses/mit-license.php</url>
</license>
</licenses>
View SampleErrorMessages.java
// Property with no value
Property 'service.endpoint' has a no value.
// Property with no @Named annotation
Property identified by key 'Key[type=io.pleo.prop.core.Prop<java.lang.String>, annotation=[none]]' has no @Named annotation.
// When a valid value was changed to an invalid one
Failed to parse property 'service.readTimeout' with value 'potato'. Keeping last valid value of 'PT1S'.
View Callback.java
public static class MyServiceClass {
private AwsClient awsClient;
public MyServiceClass(@Named("aws.key") Prop<String> awsKey) {
this.awsClient = new AwsClient(awsKey.get());
awsKey.addCallback(() -> this.awsClient = new AwsClient(awsKey.get()));
}
}
View NoCallback.java
public static class MyServiceClass {
private AwsClient awsClient;
public MyServiceClass(@Named("aws.key") Prop<String> awsKey)
{
this.awsClient = new AwsClient(awsKey.get());
}
}
View GuiceConfiguration.java
List<Module> modules = ... // Get your Guice modules
AutoPropModule autoPropModule = new AutoPropModule("io.pleo", // Package prefix
modules, // Modules to scan
new ArchaiusPropFactory(),
new JacksonParserFactory());
modules.add(autoPropModule);
Injector injector = Guice.createInjector(modules);
View MyServiceClient.java
public class MyServiceClient {
@Inject
public MyServiceClient(@Named("service.endpoint") Prop<String> endpoint,
@Named("service.readTimeout") Prop<Duration> readTimeout,
HttpClient httpClient) {
this.endpoint = endpoint;
this.readTimeout = readTimeout;
this.httpClient = httpClient;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am guisim on github.
  • I am guisim (https://keybase.io/guisim) on keybase.
  • I have a public key whose fingerprint is DD4C B4C6 9502 C419 FAD2 E477 B9D0 A623 7AF2 4BEB

To claim this, I am signing this object: