Skip to content

Instantly share code, notes, and snippets.

🦄
¯\_(ツ)_/¯

Filip W filipw

🦄
¯\_(ツ)_/¯
Block or report user

Report or block filipw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f3a09a2e779d5271bab0
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;
using NuGet.Frameworks;
using NuGet.Packaging;
View gist:a6204fa1452de1d4f61b
  1. Update VS Code settings to treat .csx as .cs

     win: C:\Users\username\AppData\Local\Code\app-0.1.0\resources\app\plugins\vs.language.csharp\ticino.plugin.json
     os x: \AppData\Local\Code\app-0.1.0\resources\app\client\vs\languages\vs.language.csharp\ticino.plugin.json
    

There is an extensions array there tht you should modify.

  1. Get omnisharp-roslyn and build

     git clone https://github.com/OmniSharp/omnisharp-roslyn.git
    
View gist:282a11f406040ff2cf0f
public class FromBodyApplicationModelConvention : IApplicationModelConvention
{
public void Apply(ApplicationModel application)
{
foreach (var controller in application.Controllers)
{
foreach (var action in controller.Actions)
{
foreach (var parameter in action.Parameters)
{
View gist:fe53ac8c57f87213c77c
> :scriptpacks
Wharrgarbl.WharrgarblScriptPackContext
Superscribe.ScriptCS.SuperscribeCS
** Methods **
- void Listen()
ScriptCs.ReplCommand.Pack.ReplCommandPackContext
** Methods **
View scriptcs.rb
# brew install --HEAD https://gist.github.com/filipw/6cbc6394360142a1976e/raw/scriptcs.rb -v
# note: requires >= mono 3.6.1 (http://www.go-mono.com/mono-downloads/download.html)
require 'formula'
class Scriptcs < Formula
homepage 'https://github.com/scriptcs/scriptcs'
head 'https://github.com/scriptcs/scriptcs.git', :branch => 'master'
View gist:52d44baad6a888569150
//usage
//removeStrongName.exe <path_to_strong_named.dll>
using System;
using System.IO;
public class Program
{
public static void Main(string[] args)
{
View gist:10454874
  1. Install SublimeREPL package from package control

  2. Install scriptcs package from package control

  3. Download this experimental build of scriptcs and extract to some folder on your machine

  4. go to ~/.config/sublime-text-2/Packages/SublimeREPL/config/ScriptCS and open Main.sublime-menu file

  5. Update the "linux" path in that file to "linux": ["mono", "PATH/TO/YOUR/scriptcs.exe", "-modules", "mono", "-repl"]

@filipw
filipw / gist:9846071
Last active May 3, 2016
ASP.NET Web API hosted in Azure Worker Role with OWIN in F#
View gist:9846071
namespace WebApi.AzureWorker
open Owin
open System
open System.Diagnostics
open System.Net
open System.Threading
open System.Net.Http
open System.Web.Http
open Microsoft.Owin.Hosting
View app.csx
#load "bootstrapper.csx"
public class IndexModule : NancyModule
{
public IndexModule()
{
Get["/"] = x => {
return View["index"];
};
}
@filipw
filipw / app.csx
Last active Aug 29, 2015
nancy on helios with OWIN and scriptcs
View app.csx
#load "bootstrapper.csx" //setup rootpathprovider and other stuff
public class IndexModule : NancyModule
{
public IndexModule()
{
Get["/"] = x => {
return View["index"];
};
}
You can’t perform that action at this time.