Skip to content

Instantly share code, notes, and snippets.

@jittuu
jittuu / scale
Last active December 21, 2015 04:39
package scale
type f func(float64) float64
type domain f
type scale f
func Domain(a, b float64) domain {
return uninterpolate(a, b)
}
@jittuu
jittuu / Observable.WithLatest.Tests.cs
Last active December 20, 2015 02:09
Observable WithLatest extension
using System;
using System.Collections.Generic;
using System.Reactive.Subjects;
using System.Reactive.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Jittuu.Reactive.Tests
{
[TestClass]
public class ObservableWithLatestTests

Movement

  e
s d f

Primary (14)

@jittuu
jittuu / jsHandler.cs
Created July 4, 2013 10:08
handle *.js request and response with min.js when applicable.
public class JsHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
var req = context.Request;
@jittuu
jittuu / beatladygaga
Last active December 16, 2015 07:49
auto voting script for our leader :P
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace BeatLadyGaga
@jittuu
jittuu / vim_cheatsheet.markdown
Created May 25, 2012 02:54
my learnt vim tips

:let @/ = ""

To clear the last used search pattern and also can set command as :C by :command C let @/="" Link

%

To jump to a matching opening or closing parenthesis, square bracket or a curly brace: ([{}])

@jittuu
jittuu / autotest_file.rb
Created August 15, 2011 06:17
autotest + test::unit + multi-platform notifier
require "autotest/fsevent"
require "test_notifier"
# monkey patching to use testdrb
# src: https://github.com/seattlerb/zentest/blob/master/lib/autotest.rb#L604
class Autotest::Rails
def testdrb
ENV['TESTDRB_PATH'] || 'testdrb'
end
@jittuu
jittuu / gist:1079933
Created July 13, 2011 08:34
.net git ignore
[Oo]bj/
[Bb]in/
*.suo
*.user
*.docstates
packages/
App_Data
@jittuu
jittuu / gist:1077371
Created July 12, 2011 03:59
my posterous theme
<!DOCTYPE html><html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta charset="utf-8">
<link rel="icon" href="{Favicon}" type="image/x-png"/>
<title>{PageTitle}</title>
<link href="http://island.heroku.com/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
<style type="text/css">
body {
font-size: 100%;
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="specFlow"
type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<specFlow>
<unitTestProvider name="xUnit" />
</specFlow>