Skip to content

Instantly share code, notes, and snippets.

View robertiagar's full-sized avatar

Robert Iagar robertiagar

View GitHub Profile
Set-ExplorerOptions -showFileExtensions
cinst 7zip
cinst 7zip.install
cinst Atom
cinst visualstudiocode
cinst markdownpad2
cinst curl
cinst fiddler4
cinst git
@robertiagar
robertiagar / payload.json
Created April 29, 2015 12:30
Payload file for a test in loader.io
{
"keys": ["username"] ,
"values": [
["user1"],
["user2"],
["user3"],
["user4"],
["user5"],
["user6"]
]
<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5255575763607038180.archive</id><updated>2014-07-31T22:35:45.719+03:00</updated><title type='text'>Robert's Blog</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://www.blogger.com/feeds/5255575763607038180/archive'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/5255575763607038180/archive'/><link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://www.blogger.com/feeds/5255575763607038180/archive'/><link rel='alternate' type='text/html' href='http://blog.robertiagar.com/'/><author><name>Robert Iagar</name><email>n
using Microsoft.ServiceBus.Notifications;
using Newtonsoft.Json;
using PodcastR.ApiCore.Comparers;
using PodcastR.ApiCore.Entities;
using PodcastR.ApiCore.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Net.Http;
@robertiagar
robertiagar / JsonContext.cs
Created October 23, 2013 20:30
a simple JsonContext that adds and removes item in a list and then saves the file to the roaming folder of a Windows 8.1 Store app.
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Storage;
namespace ExpenseManager.Repository
{
@robertiagar
robertiagar / demo.cs
Last active December 24, 2015 23:39
async await demo
class Test
{
public static async void Test()
{
var i1 = await DoWorkAsync(); //waits for the result, non-ui blocking.
var i2 = DoWork(); //blocks ui until gets result.
}
public static async Task<int> DoWorkAsync()
{
@robertiagar
robertiagar / MainViewModel.cs
Created October 4, 2013 09:54
main view model for a test app.
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Threading;
using Microsoft.AspNet.SignalR.Client.Hubs;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
@robertiagar
robertiagar / TaskWrapper.cs
Last active December 23, 2015 21:39
A wrapper class used to schedule a task in the asp.net thread pool. Currently a prototype.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ScheduledTasks
{
@robertiagar
robertiagar / stupidConfig.cs
Last active December 22, 2015 23:59
how to kill all your connected clients in signalr. this is just stupid code that I'm sharing. not sure why am I even sharing it.
public class TaskConfig
{
private static IHubContext _context = GlobalHost.ConnectionManager.GetHubContext<BroadcastHub>();
public static void RegisterTasks()
{
var t = new Task(() =>
{
while (true)