Skip to content

Instantly share code, notes, and snippets.

View ryanjbaxter's full-sized avatar

Ryan Baxter ryanjbaxter

View GitHub Profile
@ryanjbaxter
ryanjbaxter / HTMLNotesDocument.java
Created December 15, 2010 12:50
Add some HTML To A Notes Document
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.MIMEEntity;
import lotus.domino.NotesException;
import lotus.domino.Session;
import lotus.domino.Stream;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
@ryanjbaxter
ryanjbaxter / DemoBrowserFunctionViewPart.java
Created December 27, 2010 19:53
DemoBrowserFunctionViewPart
package com.acme.demo.browserfunction;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.BrowserFunction;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
public class DemoBrowserFunctionView extends ViewPart {
@ryanjbaxter
ryanjbaxter / gist:8a9e6658b9ac2e888f44
Created December 1, 2014 16:01
sensor tag not working
Mon, 01 Dec 2014 15:57:59 GMT yosemite-bindings sendCBMsg: 1, {
"kCBMsgArgName": "node-1417449479965",
"kCBMsgArgOptions": {
"kCBInitOptionShowPowerAlert": 0
},
"kCBMsgArgType": 0
}
Mon, 01 Dec 2014 15:57:59 GMT yosemite-bindings xpcEvent: {
"kCBMsgId": 6,
"kCBMsgArgs": {
@ryanjbaxter
ryanjbaxter / gist:9c551b489f53627ff788
Created December 1, 2014 16:03
sensor tag working
Mon, 01 Dec 2014 15:59:44 GMT yosemite-bindings sendCBMsg: 1, {
"kCBMsgArgName": "node-1417449584367",
"kCBMsgArgOptions": {
"kCBInitOptionShowPowerAlert": 0
},
"kCBMsgArgType": 0
}
Mon, 01 Dec 2014 15:59:44 GMT yosemite-bindings xpcEvent: {
"kCBMsgId": 6,
"kCBMsgArgs": {
@ryanjbaxter
ryanjbaxter / gist:955916c8057c40eda916
Created December 10, 2014 15:23
Zuul proxy authorization
{
"timestamp": 1418224526735,
"info": {
"remote": true,
"serviceId": "reply",
"headers": {
"request": {
"content-type": "application/json;charset=utf-8",
"connection": "keep-alive",
"accept-language": "en-US,en;q=0.5",
@ryanjbaxter
ryanjbaxter / bluegreen.sh
Last active May 16, 2018 20:14
Blue/Green Deployment Script
#!/bin/bash
#
# This product includes software originally developed by IBM Corporation.
#
#
# Copyright IBM Corp. 2015
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@ryanjbaxter
ryanjbaxter / demo.js
Created February 22, 2016 19:30
Sample Node.js Code From IDA-6754 At InterConnect 2016
var Client = require('ibmiotf').IotfApplication;
var app = new Client({
"org" : "quickstart",
"id" : "interconnectdemo"
});
app.connect();
app.on('connect', function() {
console.log('connected');
app.subscribeToDeviceEvents('+','b0b448b87385','+');
var host = "quickstart.messaging.internetofthings.ibmcloud.com";
var port = 1883;
var SensorTag = require('sensortag');
var mqtt = require('mqtt');
var topic = 'iot-2/evt/lux/fmt/json';
var clientId = 'd:quickstart:sensortag:ryanssensortag';
console.log('running');
var luxListeners = [];
SensorTag.discover(function(sensorTag) {
console.log('found sensor tag');
package com.example;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@ryanjbaxter
ryanjbaxter / MyRestClient.java
Last active September 12, 2016 18:24
Custom Ribbon RestClient class
package com.ryanjbaxter.spring.cloud.ocr.web;
import com.netflix.client.RequestSpecificRetryHandler;
import com.netflix.client.config.CommonClientConfigKey;
import com.netflix.client.config.IClientConfig;
import com.netflix.client.http.HttpRequest;
import com.netflix.client.http.HttpResponse;
import com.netflix.loadbalancer.Server;
import com.netflix.niws.client.http.RestClient;
import com.sun.jersey.api.client.Client;