This file contains hidden or 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.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Map; | |
import javax.ws.rs.client.Client; | |
import javax.ws.rs.client.ClientBuilder; | |
import javax.ws.rs.client.ClientRequestContext; | |
import javax.ws.rs.client.ClientRequestFilter; | |
import javax.ws.rs.client.Entity; | |
import javax.ws.rs.client.WebTarget; |
This file contains hidden or 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 javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
/** | |
* License : Apache License 2.0 | |
* | |
* @author Michael Bornholdt Nielsen [email protected] | |
* | |
*/ | |
public class PrettyPrintedJson { |
This file contains hidden or 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
const int sensorPin = A0; | |
const float baselineTemp = 25.0; | |
void setup(){ | |
Serial.begin(9600); // open a serial port | |
for(int pinNumber = 2; pinNumber<5; pinNumber++){ | |
pinMode(pinNumber,OUTPUT); | |
digitalWrite(pinNumber, LOW); | |
} | |
} |
This file contains hidden or 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
const int greenLEDPin = 9; | |
const int redLEDPin = 11; | |
const int blueLEDPin = 10; | |
const int redSensorPin = A0; | |
const int greenSensorPin = A1; | |
const int blueSensorPin = A2; | |
int redValue = 0; | |
int greenValue = 0; |
This file contains hidden or 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
#include <Servo.h> | |
Servo myServo; | |
int const potPin = A0; | |
int potVal; | |
int angle; | |
void setup() { | |
myServo.attach(9); |
This file contains hidden or 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 | |
# Script version of http://rhoads-zach.github.io/2015/09/02/setting-up-ssltls-with-wildfly-10/ | |
##### | |
# | |
# Before going on - start WildFly | |
# | |
# http : 8080 | |
# https : 8443 |
This file contains hidden or 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
## | |
# | |
# We want Wildfly to lisen on port 443 (yes - one below port 1024) | |
# | |
# http://wildfly-development.1055759.n5.nabble.com/Using-Wildfly-as-a-load-balancer-tt5715464.html#a5715482 | |
# | |
# sudo setcap cap_net_bind_service=+epi $JAVA_HOME/bin/java | |
# sudo setcap cap_net_bind_service=+epi $JAVA_HOME/jre/bin/java | |
# | |
# sudo echo $JAVA_HOME/jre/lib/amd64/jli/libjli.so > /etc/ld.so.conf.d/libjli.conf |
This file contains hidden or 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 | |
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ | |
-d "username=admin" \ | |
-d 'password=admin' \ | |
-d 'grant_type=password' \ | |
-d 'client_id=admin-cli' | jq -r '.access_token') | |
curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
This file contains hidden or 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
# How to sign your custom RPM package with GPG key | |
# Step: 1 | |
# Generate gpg key pair (public key and private key) | |
# | |
# You will be prompted with a series of questions about encryption. | |
# Simply select the default values presented. You will also be asked | |
# to create a Real Name, Email Address and Comment (comment optional). | |
# | |
# If you get the following response: |
This file contains hidden or 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 dk.jarry.util; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileWriter; | |
import java.io.InputStream; | |
import java.io.Writer; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; |
OlderNewer