Skip to content

Instantly share code, notes, and snippets.

View prb112's full-sized avatar

Paul Bastide prb112

View GitHub Profile
@prb112
prb112 / tags.jsp
Created October 25, 2013 14:40
shows how to update tags in the social business toolkit sdk
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="java.util.Collection"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="com.ibm.commons.runtime.Context"%>
<%@page import="com.ibm.sbt.services.client.connections.communities.Community"%>
<%@page import="com.ibm.sbt.services.client.connections.communities.CommunityList"%>
<%@page import="com.ibm.sbt.services.client.connections.communities.CommunityService"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
@prb112
prb112 / layingOutReplies.html
Created October 25, 2013 19:10
lays out forum entries given the given forum entry
<!DOCTYPE html>
<html lang="en">
<head>
<title>Social Business Playground</title>
<script type="text/javascript">
dojoConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://localhost:8080/sbt.dojo180/dojo/dojo.js.uncompressed.js"></script>
@prb112
prb112 / blogSmartCloud.jsp
Created December 24, 2013 16:01
accessing an ideation blog via smartcloud
<%String blogId = "Wd361f673ec26_43d4_b13a_5aa47d694352";
String url = "/blogs/roller-ui/rendering/feed/" + blogId + "/entries/atom?lang=en_us";
Endpoint ep = EndpointFactory.getEndpoint("smartcloudOA2");
Response response = ep.xhrGet(url);
%>
@prb112
prb112 / demo.py
Created January 30, 2014 13:11
shows how to grab a community data into CSV form. you can then use the spreadsheet to reconcile who is missing from your community
# DEMONSTRATION PURPOSES CODE ONLY
# Run
# - python demo.py EMAIL_LOGIN PASSWORD COMMUNITY_UUID
# demo.py
# Demonstrates the process of getting information from the IBM SmartCloud for Social Business
# 1 - access to the contacts lists
# 2 - access to the community membership list
# 3 - from an access list converting it to a comma separate value
@prb112
prb112 / demo.py
Created January 30, 2014 13:11
shows how to grab a community data into CSV form. you can then use the spreadsheet to reconcile who is missing from your community
# DEMONSTRATION PURPOSES CODE ONLY
# Run
# - python demo.py EMAIL_LOGIN PASSWORD COMMUNITY_UUID
# demo.py
# Demonstrates the process of getting information from the IBM SmartCloud for Social Business
# 1 - access to the contacts lists
# 2 - access to the community membership list
# 3 - from an access list converting it to a comma separate value
<html>
<head>
<title>Demo 8: IBM SmartCloud Banner</title>
<script type="text/javascript">
/**
* updates the target to support _parent for non-mail.collabservnext.com hostnames- updateTarget
*/
window.updateTarget = function(){
package json.demo;
import com.ibm.commons.util.io.json.JsonException;
import com.ibm.commons.util.io.json.JsonJavaFactory;
import com.ibm.commons.util.io.json.JsonJavaObject;
import com.ibm.commons.util.io.json.JsonParser;
import com.ibm.sbt.services.client.base.datahandlers.JsonDataHandler;
public class Main {
@prb112
prb112 / enumeration.yaml
Created September 4, 2015 00:30
Example of a Swagger Enumeration in YAML
#YAML Demonstration
swagger: '2.0'
info:
title: Demonstration of Swagger Yaml with Enumeration
description: Simple Demonstration of Enumeration
version: "1.0.0"
host: api.bastide.org
schemes:
- https
basePath: /1
CREATE COMPUTE MODULE CreateData_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE Source CHARACTER 'Production' ;
DECLARE DBSchema CHARACTER 'DB2ADMIN';
DECLARE Table CHARACTER 'EMPLOYEE';
SET OutputRoot = InputRoot;
DECLARE EMPNO1 REFERENCE TO InputRoot.JSON.Data.EMPNO;
CREATE DATABASE MODULE Test2_Database
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET Environment.Variables =
THE (SELECT T.* FROM Database.EMP AS T);
RETURN TRUE;
END;
END MODULE;