Skip to content

Instantly share code, notes, and snippets.

View nikhilk's full-sized avatar

Nikhil Kothari nikhilk

View GitHub Profile
@nikhilk
nikhilk / ipy.sh
Created January 4, 2015 19:12
Minimal IPython kernel illustrating the kernel protocol
#!/bin/sh
ipython notebook --quiet \
--KernelManager.kernel_cmd="['python', 'kernel.py', '{connection_file}']"
@nikhilk
nikhilk / A.js
Created January 28, 2013 23:03
Using script# generated AMD module w/o AMD require + getting VS intellisense.
// equivalent of ss.module ... inlined here for a sample
function module(name, obj) {
var x = {};
x[name] = obj;
return x;
}
// generated module
(function($global) {
@nikhilk
nikhilk / App.cs
Created September 29, 2012 19:00
Upcoming script# stuff... (AMD support, Node.js support, and more)
using System;
using System.Collections.Generic;
using NodeApi;
using NodeApi.Network;
[ScriptModule]
internal static class App {
static App() {
Http.CreateServer(delegate(HttpServerRequest request, HttpServerResponse response) {
@nikhilk
nikhilk / gist:952879
Created May 3, 2011 06:03
Single file generator sample/snippet from script# code
// This isn't all the code, but hopefully enough to get you started...
// ResxScriptGenerator.cs
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;