Skip to content

Instantly share code, notes, and snippets.

View hiyosi's full-sized avatar

Tomoya Usami hiyosi

View GitHub Profile

SCIM 2.0 filter

This package includes 'parser', 'lexer' and 'evaluator'.
Also parser program is generated by goyacc.

Install

go get github.com/hiyosi/scim2/filter

OmniAuth::OpenIDConnect

OpenID Connect strategy for OmniAuth Gem Version Build Status Coverage Status Code Climate

Installation

[Tag] json:name, ham:true, spam:false
[Value] eggs
[Tag] json:version, ham:false, spam:true
[Value] 1
package main
import (
"fmt"
"reflect"
)
type Meta struct {
Name string `json:"name" ham:"true" spam:"false"`
Version string `json:"version" ham:"false" spam:"true"`
@hiyosi
hiyosi / gist:6c938daac77ca217ac69
Created October 13, 2014 11:29
scim2.0 core schema draft-11
{[
{
"id" : "urn:ietf:params:scim:schemas:core:2.0:User",
"name" : "User",
"description" : "User Account",
"attributes" : [
{
"name" : "userName",
"type" : "string",
"multiValued" : false,
class Hoge
def self.hoge
obj = Kernel.const_get(klass.capitalize).new
attributes.each do |key|
obj.send("#{key}=", key.to_s + "!!!")
end
p obj
end
def self.klass
require 'mqtt'
host = '127.0.0.1'
port = 61613
MQTT::Client.connect(:remote_host => host, :remote_port => port,
:username => 'admin', :password => 'password') do |client|
client.get('tutorial') do |topic,message|
require 'mqtt'
host = '127.0.0.1'
port = 61613
MQTT::Client.connect(:remote_host => host, :remote_port => port,
:username => 'admin', :password => 'password') do |client|
client.publish('tutorial', 'Hello, Apollo', retain=true)