Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Management;
using System.Reflection;
using IONClient.Collector;
{<?xml version="1.0" encoding="utf-8"?>
<applications>
<application>
<DisplayName />
<Publisher />
<InstallDate />
<Version />
<UninstallString />
</application>
<application>
<div class="modal hide" id="deleteMachine" >
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
×
</button>
<h3>Machine Deletion</h3>
</div>
<div class="modal-body">
Are you sure that you want to delete this machine? <%= @current_machine_id%>
using System;
namespace IONService.Config
{
class Variables
{
//app
static public string IONServiceServiceName = "IONService";
using System;
namespace IONService.Config
{
class Variables
{
//app
static public string IONServiceServiceName = "IONService";
@andySF
andySF / gist:3626003
Created September 4, 2012 20:20
.net installed programs
if (Request.ContentType == Common.ContentTypeAsXml)
{
//Rails logic:
//mark all programs for this machine to installed=false
//then for each program if exists mark installed as true
//else add
var installedProgramsXML = new StreamReader(Request.InputStream).ReadToEnd();
@andySF
andySF / gist:3626010
Created September 4, 2012 20:20
ruby installed programs
Program.transaction do
Program.update_all({:Installed=>FALSE}, {:machine_id=>params[:machine_id]})
params[:programs][:program].each do |t|
if(Program.exists?(:DisplayName=>t[:DisplayName], :Version=>t[:Version], :machine_id=>t[:machine_id]))
Program.where(:DisplayName=>t[:DisplayName], :Version=>t[:Version], :machine_id=>t[:machine_id]).update_all :Installed=>TRUE
else
Program.create(t)
end
end
end
$('.typeahead').typeahead({
});
$('.group').focusout(function (e) {
if (e.target.value == "") {
return;
}
$('.typeahead').typeahead({
});
$('.group').on('change', function (e) {
if (e.target.value == "") {
return;
}
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{