Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Iagar robertiagar

View GitHub Profile
View gist:3009bc21637919d3ce54
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 Apr 29, 2015
Payload file for a test in loader.io
View payload.json
{
"keys": ["username"] ,
"values": [
["user1"],
["user2"],
["user3"],
["user4"],
["user5"],
["user6"]
]
View feed.xml
<?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
View program.cs
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 Oct 23, 2013
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.
View JsonContext.cs
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 Dec 24, 2015
async await demo
View demo.cs
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 Oct 4, 2013
main view model for a test app.
View MainViewModel.cs
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 Dec 23, 2015
A wrapper class used to schedule a task in the asp.net thread pool. Currently a prototype.
View TaskWrapper.cs
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 Dec 22, 2015
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.
View stupidConfig.cs
public class TaskConfig
{
private static IHubContext _context = GlobalHost.ConnectionManager.GetHubContext<BroadcastHub>();
public static void RegisterTasks()
{
var t = new Task(() =>
{
while (true)