Skip to content

Instantly share code, notes, and snippets.

View ChrisMoney's full-sized avatar

Chris Weathers ChrisMoney

  • Onevested
  • St. Louis, MO
View GitHub Profile
if (this.HOPolicyType == HOPolicyType_HOE.TC_HO3 or this.HOPolicyType == HOPolicyType_HOE.TC_HO6) {
if (this.ConstructionType != ConstructionType_HOE.TC_L and this.HODW_Earthquake_HOEExists and this.HODW_Loss_Earthquake_HOEExists) {
bool = true;
}
}
return bool;
@ChrisMoney
ChrisMoney / kafkaCommands.sh
Last active April 2, 2020 15:25
Kafka Commands to start Zookeeper broker and spin up Producer and Consumer
-- Start Zookeeper and kafka
$ ./bin/zookeeper-server-start ./etc/kafka/zookeeper.properties
$ ./bin/kafka-server-start ./etc/kafka/server.properties
$ ./bin/schema-registry-start ./etc/schema-registry/schema-registry.properties
-- Create Schema Command (Java app will do this part)
./bin/kafka-avro-console-producer \
--broker-list localhost:9092 --topic test \
--property value.schema='{"type":"record","name":"Provider","fields":[{"name":"ProviderID","type":"int"},{"name":"Location_ID","type":"int"},{"name":"Network_ID","type":"int"},{"name":"Practitioner_ID","type":"int"},{"name":"ProviderName","type":"string"}]}' --property schema.registry.url=http://localhost:9092
@ChrisMoney
ChrisMoney / messagingService.cs
Created November 1, 2019 18:40
Messaging Queue message service response
using System;
using System.Messaging;
class Replier {
private MessageQueue invalidQueue;
public Replier(String requestQueueName, String invalidQueueName)
{
MessageQueue requestQueue = new MessageQueue(requestQueueName);
@ChrisMoney
ChrisMoney / messageService.cs
Last active November 1, 2019 18:39
Message Queue messaging service request
using System;
using System.Messaging;
public class Requestor
{
private MessageQueue requestQueue;
private MessageQueue replyQueue;
public Requestor(String requestQueueName, String replyQueueName)
{
@ChrisMoney
ChrisMoney / splunk.cs
Last active October 21, 2019 16:46
Log to Splunk
/// <summary>
/// Send a single event to Splunk
/// </summary>
bool SubmitSingleEventToSplunk(string message, string host, string sourcetype)
{
var client = new RestClient();
client.BaseUrl = BuildUrl();
client.Authenticator = new HttpBasicAuthenticator(_username, _password);
@ChrisMoney
ChrisMoney / clean_assemblies.ps1
Created October 1, 2019 16:59
Clean Assemblies on Windows
Remove-Item -path C:\GitHub\Platform\src\VCU.Data\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data.Portable\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data.Portable\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.API\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.API\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.ApiAdmin\bin -ErrorAction SilentlyContinue -Recurse -Force
@ChrisMoney
ChrisMoney / clean_assemblies.txt
Created October 1, 2019 16:53
Clean assemblies in solution on MAC
#!/bin/bash
# mobile.iOS
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.iOS/bin || true
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.iOS/obj || true
# mobile.Android
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.Android/bin || true
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.Android/obj || true
@ChrisMoney
ChrisMoney / deploy-xamarin.txt
Created September 26, 2019 20:36
Deploy Xamarin mobile build to Google Play Store
Purpose
The purpose of this document is to aide in compiling an IPA file for distribution to the Google App Store.
Software Requirements:
Xcode
Visual Studio
Xamarin.android extension
If you plan to create the build with Visual Studio for Windows then you will need to configure a mac build server which is beyond the scope of this document.
@ChrisMoney
ChrisMoney / clean_bin_obj_folders-windows.ps1
Last active August 22, 2019 14:20
Delete Bin & Object folders on Windows
Remove-Item -path C:\GitHub\Platform\src\VCU.Data\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data.Portable\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.Data.Portable\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.API\bin -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.API\obj -ErrorAction SilentlyContinue -Recurse -Force
Remove-Item -path C:\GitHub\Platform\src\VCU.ApiAdmin\bin -ErrorAction SilentlyContinue -Recurse -Force
@ChrisMoney
ChrisMoney / clean_bin_object_folders-mac.txt
Last active August 22, 2019 14:15
Bash script for Mac/Linux to delete bin & object folders
#!/bin/bash
#Rm : deletes folder
# -R : deletes directory
# -rf : deletes directory if exists, if not, ignores it
# mobile.iOS
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.iOS/bin || true
Rm -rf -R ~/Documents/GitHub/Platform/src/mobile.iOS/obj || true