Skip to content

Instantly share code, notes, and snippets.

View prb112's full-sized avatar

Paul Bastide prb112

View GitHub Profile
@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 / 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);
%>
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;
@prb112
prb112 / log4j.properties
Created January 18, 2017 00:47
Phoenix logging
log4j.rootLogger=TRACE, A1
log4j.appender.A1=org.apache.log4j.RollingFileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.maxFileSize=100GB
log4j.appender.A1.File=/tmp/phoenix-query.log
# Print the date in ISO 8601 format
log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
#Adding properties to dump the SQL into the log file