Skip to content

Instantly share code, notes, and snippets.

View nesteruk's full-sized avatar
🍸
retired

Dmitri Nesteruk nesteruk

🍸
retired
  • Mesa Funds
View GitHub Profile
@nesteruk
nesteruk / SharpKitPhantomJS
Created December 2, 2011 12:02
SharpKit interface definitions for PhantomJS
using SharpKit.JavaScript;
namespace PhantomJS
{
[JsType(JsMode.Prototype, Export = false, Name = "console")]
public static class Console
{
public static void log(string message) {}
}
@nesteruk
nesteruk / gist:1474476
Created December 13, 2011 23:35
Highlighting on 2nd line in every document
using System;
using System.Collections.Generic;
using System.Diagnostics;
using JetBrains.Annotations;
using JetBrains.Application.Progress;
using JetBrains.Application.Settings;
using JetBrains.DocumentModel;
using JetBrains.ReSharper.Daemon;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;
@nesteruk
nesteruk / gist:1632782
Created January 18, 2012 12:29
Random list duplication
#include <iostream>
using namespace std;
struct list_item
{
list_item *next;
list_item *rand;
};
void deep_copy(list_item* src, list_item* &dst)
@nesteruk
nesteruk / gist:1632784
Created January 18, 2012 12:30
Random list generation program (with comments :)
#include <iostream>
using namespace std;
struct list_item
{
list_item *next;
list_item *rand;
};
void deep_copy(list_item* src, list_item* &dst)
@nesteruk
nesteruk / CSharpInProcessCompiler
Created August 23, 2012 11:40
C# in-process compiler
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using Microsoft.CSharp;
namespace ActiveMesa.R2P.Infrastructure
{
@nesteruk
nesteruk / MixinContextAction
Created August 23, 2012 11:43
Mixin context action
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using ActiveMesa.R2P.ContextActions;
using ActiveMesa.R2P.Infrastructure;
using JetBrains.Application;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
@nesteruk
nesteruk / ReadOnlyInterfaceGen.cs
Created November 6, 2012 10:49
Readonly interface generator
using System.Collections.Generic;
using System.Linq;
using JetBrains.ActionManagement;
using JetBrains.Annotations;
using JetBrains.Application.DataContext;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.CSharp.Generate;
using JetBrains.ReSharper.Feature.Services.Generate;
using JetBrains.ReSharper.Feature.Services.Generate.Actions;
using JetBrains.ReSharper.Psi;
@nesteruk
nesteruk / gist:4152824
Created November 27, 2012 06:57
Factoring context action
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JetBrains.ReSharper.Psi.CSharp.Tree;
namespace ActiveMesa.R2P.Maths.Factor
{
using System;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
a*x*x + b*x + c
x*(a*x + b) + c