Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<Envelope xmlns="http://schemas.microsoft.com/dynamics/2011/01/documents/Message">
<Header>
<MessageId>{8B3BB1F0-0D28-420F-8546-D6A033229C04}</MessageId>
<Action>http://schemas.microsoft.com/dynamics/2008/01/services/CountingJournalService/create</Action>
</Header>
<Body>
<MessageParts>
<CountingJournal xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/CountingJournal">
<InventJournalTable class="entity">
@fraga
fraga / get_all_commits_per_user.sh
Last active January 5, 2018 15:34
Git command to count all commits per user on a repo
git log --pretty=format:"%an"| env LC_ALL=C sort| env LC_ALL=C uniq -c| env LC_ALL=C sort -r
public void Test(){
return 0;
}
@fraga
fraga / gist:4490746
Last active December 10, 2015 20:48
Creating Product Master with configuration and it's variant, then releasing it
static void CreateProduct(Args _args)
{
EcoResProductMasterManager manager = EcoResProductMasterManager::construct();
recId productMasterRecId;
EcoResDistinctProductVariant productVariant;
EcoResProductVariantCreationMgr productVariantCreationMgr = new EcoResProductVariantCreationMgr();
container productVariantContainer;
EcoResProductVariantDimValue productVariantDimValue;
EcoResTmpProductVariantSuggestion productVariantSuggestion;
EcoResProductDimGroupSetup productDimGroupSetup = EcoResProductDimGroupSetup::construct();
@fraga
fraga / instagram.cs
Created November 19, 2012 04:10
Get all images from instagram (api v1)
do
{
if (webRequest == null && string.IsNullOrEmpty(nextPageUrl))
webRequest = HttpWebRequest.Create(String.Format("https://api.instagram.com/v1/tags/{0}/media/recent?client_id={1}", tagName, clientId));
else
webRequest = HttpWebRequest.Create(nextPageUrl);
var responseStream = webRequest.GetResponse().GetResponseStream();
Encoding encode = System.Text.Encoding.Default;
@fraga
fraga / gist:1566674
Created January 5, 2012 19:03
Setting up xUnit in VS as external tool
Go to Tools -> External Tools -> Add
Command: Your xunit.console.exe file path
Arguments: $(BinDir)$(TargetName)$(TargetExt)
Initial Directory: $(BinDir)
Change xunit.console.config so that you have requiredRuntime if you want to run .NET 4.0
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
@fraga
fraga / InstallGetPsPoshGit
Created January 3, 2012 22:26
Installing GetPs and Posh-Git
(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex
Install-Module Posh-Git –force
@fraga
fraga / EnableRemoteErrors.rss
Created September 8, 2011 03:16
Enabling remote errors in SRSS
1) Put this code in a file called EnableRemoteErrors.rss
Public Sub Main()
Dim P As New [Property]()
P.Name = "EnableRemoteErrors"
P.Value = True
Dim Properties(0) As [Property]
Properties(0) = P
Try
rs.SetSystemProperties(Properties)
@fraga
fraga / gist:1187727
Created September 2, 2011 01:15
How to create an item using ItemServices and EcoResProductServices in AX 2012
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.ServiceModel.Description;
using System.Text;
using Tutorial.AIF.CreateItem.EcoResProductServices;
using Tutorial.AIF.CreateItem.InventItemServices;
namespace Tutorial.AIF.CreateItem
@fraga
fraga / gist:1078411
Created July 12, 2011 16:55
C# console command line utility to get user SID AX 2012
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.DirectoryServices;
namespace GetUserSID
{
/// <summary>
/// This class must work on a username and domainname, access active directory services