Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Baxter ryanjbaxter

View GitHub Profile
View gist:8a9e6658b9ac2e888f44
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": {
View gist:9c551b489f53627ff788
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": {
View gist:955916c8057c40eda916
{
"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 / HTMLNotesDocument.java
Created Dec 15, 2010
Add some HTML To A Notes Document
View HTMLNotesDocument.java
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;
View DemoBrowserFunctionViewPart.java
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 / demo.js
Created Feb 22, 2016
Sample Node.js Code From IDA-6754 At InterConnect 2016
View demo.js
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','+');
View Fluent-MQTT-Device.js
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');
View sample.java
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 Sep 12, 2016
Custom Ribbon RestClient class
View MyRestClient.java
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;
@ryanjbaxter
ryanjbaxter / bluegreen.sh
Last active May 16, 2018
Blue/Green Deployment Script
View bluegreen.sh
#!/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
You can’t perform that action at this time.