- Buy a mac mini
- Install 10.8
- Create a user account for Jenkins
- Install xcode
- Turn on screen sharing
- Turn off energy save sleeping
- Login as your jenkins user
- Use ssh-keygen to create a key for github
- Create a github account for your build machine
- Add the key to your build machine github account
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 de.knallisworld.hibernate5; | |
import org.hibernate.boot.model.naming.Identifier; | |
import org.hibernate.boot.model.naming.PhysicalNamingStrategy; | |
import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl; | |
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; | |
import java.util.Optional; | |
import java.util.StringTokenizer; |
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
#!/bin/bash | |
PLIST=platforms/ios/*/*-Info.plist | |
cat << EOF | | |
Add :NSAppTransportSecurity dict | |
Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool YES | |
EOF | |
while read line | |
do |
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
'use strict'; | |
let Service = require("HAP-NodeJS").Service; | |
let Characteristic = require("HAP-NodeJS").Characteristic; | |
let WebSocketClient = require('websocket').client; | |
class Utils { | |
assertUtf8Message(message) { | |
return new Promise((resolve, reject) => { | |
if (message.type === 'utf8') { |
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
#!/bin/sh | |
if [ "$(id -u)" != "0" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi | |
if !(type pcp 2>/dev/null;) then | |
yum -y install git bison flex gcc-c++ perl-Tk-devel libmicrohttpd-devel | |
git clone git://git.pcp.io/pcp |
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
@MessagingGateway | |
public interface ApiGateway { | |
@Gateway(requestChannel = "requestChannel", replyChannel = "resultChannel") | |
Response handle(Request request); | |
} |
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 javax.naming.NamingException; | |
import javax.naming.spi.NamingManager; | |
import java.util.Hashtable; | |
public class CheckActiveDirectoryConnectionViaLdap_ForSpringSecurity { | |
public static void main(String... args) throws NamingException { | |
Hashtable<String, String> table = new Hashtable<>(); | |
table.put("java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory"); | |
table.put("java.naming.provider.url", "ldap://$HOST:389"); |
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
# /etc/systemd/system/jstatd.service | |
# | |
# Install: | |
# - Put this file on /etc/systemd/system/jstatd.service | |
# - Rewrite <host ip> | |
# | |
# Usage: | |
# sudo systemctl enable jstatd | |
# sudo systemctl start jstatd | |
# |
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
node { | |
stage('Demo') { | |
echo "Hello world" | |
withConfigEnv('env') { | |
echo "Here we go:" | |
sh "printenv" | |
} | |
} | |
} |
This solves the issue that MongoDB documents are stored under and read with different UUID formats between different environments, for example Java drivers and the Mongo Shell.
- Download https://github.com/mongodb/mongo-csharp-driver/blob/750d021a0ea5fcc6ade34b4a968fdbe16f3d2377/uuidhelpers.js
- Load the script into the Mongo Shell, i.e. mongo --shell uuidhelpers.js
JUUID("a635b4cf-0d53-4780-8b10-0f27ec2197ff")