Posts

Host Webex in a Public Space while blasting Music; Use Blackhole

Image
I wear alot of hats in my life as an IT generalist. Most mornings I'm hosting at least one meeting and I like to play a variety of music while my participants wait for the attendees to join. I will usually try to get a meeting room, but as more folks RTO (Return to Office) it's gets a bit harder to find an available space.  I needed a solution that would allow me to play music quietly without disturbing my office mates and found that Blackhole would create an audio loopback device and allow me to do this.  Blackhole Audio Driver can be downloaded here . Download and install Blackhole. Create Blackhole Loopback Open Audio MIDI Setup Bottom Left, click "+" and choose "Create Multi-Output Device" Turn on your Bluetooth Headset. Select BlackHole 2ch and your headset. I chose my Jabra Evolve 65 headset. R edirect Mac Sound output to Multi-Output Device Open your music player and start a tune. Start your Webex with Speakers set to "Use System Setting", a...

Simple GitHub Issue Export using Python

We needed a way to export GitHub issues and comments to import into Jira. This Python example easily exports these via the Rest api, and is quite simple to customize to suit your needs. Create a Personal Access Token and use this in place of the one in line 10 (after the word "token" of course). You'll need to pick through the GitHub Api if you want more things like attachments. I'm also a big fan of the Google Advanced Rest Client to review the data. Interesting coincident that M$ is in talks to buy GitHub ... import requests import json import csv api_url = 'https://github.ibm.com/api/v3/' repo = 'repos/CloudBI/reports' headers = { 'Accept': 'application/vnd.github.v3+json', 'Authorization': 'token c0ns1d3rg3tt1ingy0ur0wn' } # this will return the number pages of issues to return def get_num_pages(): r = requests.request("GET", api_url + repo, headers=headers) if r.status_co...

ETL - Using Python to push data to Salesforce Analytics

The problem: develop a method to automate the process of pushing data from our Netezza reporting warehouse to Salesforce Analytics for consolidated reporting. In my quest to solve this problem, I created the Python script below. The commented yum & pip installs at the top of the script are required bits to make it work. Sharing the data is outside the scope of this script, but it is easily solved by first creating a data set and sharing it out then using the script to overwrite it. # sudo yum install python-devel # sudo pip install ibm_db # sudo pip install simple_salesforce # sudo pip install jaydebeapi from simple_salesforce import Salesforce import requests import jaydebeapi import sys import csv import base64 import os import tempfile import math # set up some variables debug = True fname = "./data/temp.csv" errlog = "./log/errorlog.txt" metadata = "./metadata/SfdcMedalliaMetadata.json" driver = "./drivers/nzjdbc.jar" # Salesf...

Creating SCSM tickets using SMLets and ASP.NET

Image
English: This is a photo of a room full of computers all showing the same windows error message at the Nanyang Technological University in Singapore (Photo credit: Wikipedia ) I was trying to figure out how we could leverage ASP.Net to create more functional forms for end user ticket creation in SCSM. Many would agree that the self service portal is a bit restricted and we needed a method for our Apps group to submit Change Requests that would comply with SOX. I found a few examples around the net regarding the power of SMLets and PowerShell and eventually found that there are classes available in .Net for leveraging this. My first major hurdle was determining why I kept getting a strange error message " Unable to access Windows PowerShell PowerShellEngine registry information. "   when trying to replicate these efforts . My errors seemed to stem from trying to use assemblies built with prior versions of the .Net library, and instead of writing a wrapper of so...

Crystal Reports, Advanced SQL Commands and Parameters

Image
Crystal Reports Pic 4 - Select Data Tables (Photo credit: wmharshana ) I've not written a Crystal Report that required a more advanced query in quite a while, and had a need to union two selects and pass in a parameter to both queries. I initially just wrote the Union query and attempted to place my {?CustomerName} in both places using the "=" comparison operator, which worked. When I wanted to add the ability for the user to only add a portion of the customer name in the query and use the LIKE operator, Crystal had some issues and thought I was trying to pass a column name or some such trash. Eventually I found an article that suggested the use of a DECLARE and SET to hold the parameter that Crystal passes, then hand it off to the query. This also failed until I wrapped the entire UNION in a SELECT and passed in the parameter once. Yay! DECLARE @Cust VarChar(200) SET @Cust = '{?CustomerName}' SELECT * FROM ( SELECT Name, Address, City, State, Zi...

Find GridView Cell Values on RowCommand with Paging Enabled

This was confounding me this morning until I found this  post on the ASP.NET forums. I was setting up a GridView and needed to check the values of a couple of cells before I let users click a button in an ItemTemplate. I initially used the Container.DateItemIndex method to determine which row they clicked but quickly found out that this only works without Paging Enabled as noted on the MSDN . All this does is tell you the index of the data, but since the GridView index needs to be reset on each page (0-your page size) you'll never find your values. Instead set is thusly: You'll be able to easily access your cells then: Dim index As Integer = Int32.Parse(e.CommandArgument.ToString()) Dim row As GridViewRow = GV_OrderHeaders.Rows(index) Dim ifs As String = DirectCast(row.FindControl("lblIfsId"), Label).Text Dim oid As String = DirectCast(row.Fi...

Mexicali Chili

Image
1 lb lean ground beef 1 medium onion, diced 1 14oz can chili beans 1 16oz jar corn salsa 3 large Idaho potatoes, diced 3 cups water 2 cups cold milk 2 tbl corn starch Brown beef, season with 1/2 tsp cumin, 1/2 tsp salt, 1/2 tsp chili powder if desired. Sweat onion in 1 tbl butter separately. Mix beef, onion, beans, salsa, potatoes and water in large pot. Bring to a boil, then cover and simmer for 30 minutes. Mix milk and cornstarch in small bowl. When potatoes are tender, slowly stir in milk mixture. Mix for a minute or so as the chili thickens. Serve with diced avacado, tomato, and maybe some feta? Enjoy, we did!

Crystal Reports Server 2008, WACS and AD Auth on 2008 Domain

Image
Image via CrunchBase This was kicking my butt the past couple of days. Up to this point, I'd simply been using the server to schedule and email reports out to people. What I wanted was to allow users to log in with their AD credentials, browse InfoView and run their own reports. Simple, right? This is how I did it. Create a service account in AD. This account doesn't need elevated privileges  Tick the User cannot change password and Password never expires boxes. In my example the account is svc_crs . Use setspn.exe to create the Service Principal Name. Run the command on a DC in a command prompt with elevated privileges. Here is more info on setspn . The convention is setspn -a MySpnName/MySvcAcct.Domain.Com MySvcAcct . In my environment I used setspn.exe -a  CrystalSvr/svc_crs.NETWORK.INTERNAL svc_crs . Open your service account Account Properties in Active Directory Users and Computers , select the Delegation tab, and change delegation t...

New Sourcegforge Project

Image
English: jQuery Mobile logo. (Photo credit: Wikipedia ) I just posted a new project on Sourceforge , called Anonymous Compliance Reporting . Anonymous Compliance Reporting aims to be a solution for small organizations that desire to adhere to the corporate practice of providing a means for employees to report issues anonymously. This project originated to provide a mechanism for my employers staff to report instances of compliance violation in the workplace, e.g. improper handling of PHI (Patient Health Information ), HIPAA violations, and the like. I took on the task of updating it recently, to a more robust " Web 2.0 " application, adding JQuery , Ajax, and updated graphics. It runs on both LAMP and WAMP servers. Documentation is on this wiki  https://sourceforge.net/p/anonrep/wiki/Home/  and in the README file in the download package. The sample website is completely open to play with, the credentials are admin / password. Have fun! Anonymous Compli...

ADFS and AD User Name Changes

Image
One of our users was recently married, and had her name changed. Two days later she opened a helpdesk ticket indicating one of our claims aware applications denied her access to it's resources. After enabling ADFS debug logging, I discovered that the server was still referencing her old user name . After a few minutes of Googling, I found this article that points to a MS KB article outlining the use of LSA caching user SID's, creating my problem. A quick Powershell script keeps this from happening again after creating the registry key noted in the KB article: $RegKey="HKLM:\System\CurrentControlSet\Control\Lsa" Set-ItemProperty -path $RegKey -name LsaLookupCacheMaxSize -value 0 Set-ItemProperty -path $RegKey -name LsaLookupCacheMaxSize -value 128

Easy CSV import into Oracle

Image
English: The logo of Oracle Corporation de:Bild:Oracle-Logo.svg he:תמונה:Oracle Logo.jpg (Photo credit: Wikipedia ) The easiest way I've found to import text data sources into Oracle have been using the Microsoft SQL Server Import and Export Wizard that comes with Standard, Enterprise or Developer editions of MS SQL Server. Assuming you've got the Oracle database drivers installed, just right click a database from within SQL Server Management Studio, choose Tasks -> Import Data. As your datasource, choose your CSV or text file . After you've configured the specifics of your data source, you'll need to choose a destination. Choose the OLE DB Provider for Oracle, then click Properties. Instead of using your Server Name, enter the database instance name and the credentials.  Click Text Connection to be sure it is correct, and click Allow saving password. Click OK. Click Next. In the next window, choose the destination table you've ...

ADFS AutoCertificateRollover

Image
BITE (show) (Photo credit: Wikipedia ) Leaving your ADFS 2.0 installation in AutoCertificateRollover mode will most certainly bite you in the ass at some point. This is the default mode when you install ADFS, and when your certificate expires, you'll get something that looks like this: The key to your answer is in the first line: ID4175: The issuer of the security token was not recognized by the IssuerNameRegistry. All you need to do is insert the new thumbprint from your ADFS Token-signing certificate. Make sure it's all in uppercase, and you've not added any invalid character codes, or spaces in the thumbprint or you will continue to get this error message . You are better served by generating another certificate for a longer period than the default 1 year. You can easily do this by opening Windows PowerShell and issuing the following: First, add your snapin: Add-PsSnapin Microsoft.Adfs.Powershell Show a list of your ADFS properties. Get-ADFSProperti...

OpenAir ETL Project

Image
Image via CrunchBase Reporting in OpenAir has presented our company with some challenges. As such, I was asked to take a look at how we might be able to create an ETL of this data , create our reports and automatically distribute them to our project managers. This is how I did it. First we needed to purchase OpenAir's Automated Backup service. This service will export data in text format or MySQL dumps of any or all tables in their database, zip them up and deposit them anywhere via FTP, FTPS , or SFTP . We set up an FTP server for our repository in the DMZ. Once this bit was done, I needed an installation of MySQL Server and a method to programmatically pull the data from the DMZ, deposit it on a Windows share, unzip and insert the data. Below is a batch file used for this purpose. @ECHO On SETLOCAL ENABLEDELAYEDEXPANSION @SET _LOGFILE="C:\Export\LOGS\OpenAirMysqlImports.txt" @SET _MYSQL="C:\Program Files\MySQL\MySQL Server 5.5\bin\mysql.exe...

Mobile posing

Image
Does anyone actually do this? Well, here are my wife and I waiting for our son after school on Monday. He loves to unwind on the playground, so we gave him about 30 minutes to burn more of the day off.

System.ArgumentException: Keyword not supported: 'unicode'.

Image
Image via Wikipedia This error was giving me fits today. Thought I had my Oracle connection string all setup correctly, since I'd already used it for a GridView control. Thinking I could just copy/paste a SqlDataSource command down for another couple of controls, it should have been a snap... But I kept getting these System.ArgumentException errors pointing me to my web.config!!!! WTH??? Turns out I forgot ONE parameter in my SqlDataSource object: ProviderName="<%$ ConnectionStrings:MyWebConfigDsn.ProviderName %>" Voila, all is well in the world.

Adding Animation to the AutoCompleteExtender

Image
Image via Wikipedia After reading numerous articles relating to the AutoCompleteExtender, I was able to use CSS to set the overflow property of the ul that comprises the drop-down selector to get the browser to render a vertical scroll bar , making it easier to look through a long list. My struggle was to get the list to shrink backup up after the item was selected and not sit on top of other elements below. I tried using javascript on the OnClientItemSelected event of the extender to set the ul to a low zIndex, but this only partially succeeded since the ul would never produce an event I could find to bring it back to the top of all elements on subsequent picks. I also tried setting the height on the fly, but only ended up with the same thing as before, no event to expand it back out again. Then I found a couple of clues on the internet that pointed to using the Animations XML beyond what I was using it for, which was simply to add 'glitz' to the picker. ...

My Sister Elizabeth

Image
My sister Elizabeth Croson was diagnosed with PPMS (Primary Progressive Multiple Sclerosis ) several years ago. Before the disease robbed her of most of the things we take for granted, she enjoyed writing among other things. Here is one of a few stories I'll be posting. YOU KNEW THIS WHEN YOU MARRIED ME Four years ago on November 4th I met, who is now my husband Curtis. It was a cold and rainy afternoon, 12:37 to be exact. My fiancée, at the time, and I had driven down to Arkansas to witness the joyous event of my cousin's wedding. I was the maid of honor. I still have yet to understand why it is considered such an "honor ". The utter chaos and confusion one must endure is anything but an honor, but I willingly refrained from making my cousin's day unhappy and shut my mouth. When we arrived in Arkansas , we met with Eric the future hubby, and some of his friends that had driven down to be apart of the festivities. Curtis being Eric's best friend and bes...