Skip to content

Instantly share code, notes, and snippets.

View Microsofttechies's full-sized avatar

Venkat G Microsofttechies

View GitHub Profile
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="/Style%20Library/POC/Scripts/jquery.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<script src="/_layouts/SP.js" temp_src="/_layouts/SP.js" type="text/ecmascript"></script>
@Microsofttechies
Microsofttechies / gist:71c8847343ae9954d6f7d9960ede934d
Created September 12, 2016 05:23
Building a Registration/Sign Up Solution in SharePoint
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<body>
<div id="readDiv">
@Microsofttechies
Microsofttechies / gist:acd95a15df73f23f2fca72b82d39e44c
Last active September 11, 2016 04:50
SharePoint Online Pull values from a lookup column using SPServices()
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/2014.02/jquery.SPServices.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
</head>
<script>
$(document).ready(function () {
//With out ID
$().SPServices({
@Microsofttechies
Microsofttechies / gist:8c7e77ee150fe79a334a
Last active January 26, 2016 19:56
Aras Innovator sample AML and IOM
This is an example of a BOM in AML language:
<Item type="Part" action="add">
<item_number>999-888</item_number>
<description>Some Assy</description>
<Relationships>
<Item type="Part BOM" action="add">
<quantity>10</quantity>
<related_id>
<Item type="Part" action="add">
<item_number>123-456</item_number>
@Microsofttechies
Microsofttechies / gist:5f40662980981b8d122d
Last active August 29, 2015 14:20
c# xelement change attribute value
<Root>
<Address myatt="abc">NY</Address>
<Address>AUS</Address>
</Root>
if (myXelement.Element("Address").Attribute("myatt").Value == "Abc")
{
myXelement.Element("Address").Attribute("myatt").Value = "XYZ";
}
@Microsofttechies
Microsofttechies / gist:e2214563c4a4c91cdf82
Created May 8, 2015 00:12
C# Append lines to a file using a StreamWriter
StringBuilder strBuilLog = new StringBuilder();
string strLogData = "Welcome to log data \t";
strBuilLog.Append(strLogData);
string strLogData2 = "Welcome to log data 2" + Environment.NewLine;
strBuilLog.Append(strLogData2);
string strLogDataFinal = "Welcome to log data final \t";
strBuilLog.Append(strLogDataFinal);
using (StreamWriter strwLog = new StreamWriter("c:\\log.txt"))
{
@Microsofttechies
Microsofttechies / gist:0b5d8edb19b5a560fe0f
Created April 16, 2015 17:45
Calling exe from Powershell
Param
(
[string]$exePath = $null
)
write-host “Calling exe”
$startTime = Get-Date
Write-Host "Start time " + $startTime.ToString("u")
$exePath = $exePath
& $exePath
@Set exePath="C:\My.exe"
Echo "Call PS1"
PowerShell.exe Set-ExecutionPolicy RemoteSigned; "C:\MyScript.PS1" -exePath %exePath%
Echo "End PS1"
PAUSE
@Microsofttechies
Microsofttechies / gist:e1dfeb99049a938ecb66
Created April 16, 2015 17:21
powershell script to run exe
cls
$startTime = Get-Date
Write-Host "Start " + $startTime.ToString("u")
$exePath = "C:\My.exe"
& $exePath
$endTime = Get-Date
Write-Host "End " + $endTime.ToString("u")
@Microsofttechies
Microsofttechies / gist:df7f045c8e2a8fe1874d
Last active August 29, 2015 14:19
XML to string Self-closing element does not fire a EndElement event
XmlTextReader objreader = new XmlTextReader("c:\\a.xml");
StringBuilder strBuilXML = new StringBuilder();
while (objreader.Read())
{
if (objreader.IsStartElement())
{
if (objreader.IsEmptyElement)
{