Skip to content

Instantly share code, notes, and snippets.

@skoon
skoon / htsettings.json
Last active July 3, 2018 18:56
hyperterm settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Punchclock;
namespace AsyncPlayground
{
class Program
var searchForSubject = function(model, event){
_subjectSearchText = event.srcElement.value;
console.log(_subjectSearchText);
// simple first algorithm -
// wait for 1 second
// search if
// the search string is non-falsey
// the string at the start of the timeout is the same as the current
// the search string is at least 3 characters
@skoon
skoon / Slick.RowSelector.js
Created April 4, 2013 17:54
Row selector for SlickGrid that allows for drag selecting of rows.
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"DragRowSelectionModel": DragRowSelectionModel
}
});
function DragRowSelectionModel(options) {
public static class Extensions
{
public static IEnumerable<DropDownFormat> ToDropDownFormat<T>(this IList<T> list,
Expression<Func<T, int>> idColumn,
Expression<Func<T, string>> textColumn)
{
List<DropDownFormat> retList = new List<DropDownFormat>();
var idMemberExp = (MemberExpression)idColumn.Body;
var textMemberExp = (MemberExpression)textColumn.Body;
@skoon
skoon / bootstrap_ts.js
Created October 2, 2012 07:04
JS produced by TypeScript
var bootstrap;
(function (bootstrap) {
var itemsLoaded = [];//maintain a list of items we have already loaded to prevent duplicates
var bootstrap = (function () {
function bootstrap(scriptSource, scriptId, callback) {
head = document.head || document.getElementsByTagName("head")[0];
scriptId = scriptId || "script" + Math.floor(Math.random() * 1234);
this.scriptSource = scriptSource;
callback = callback || null;
@skoon
skoon / bootstrap.ts
Created October 2, 2012 07:03
TypeScript file
module bootstrap {
var itemsLoaded = []; //maintain a list of items we have already loaded to prevent duplicates
class bootstrap {
loaded: bool;
scriptSource: string;
scriptTag: string;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ScrewTurn.Wiki.PluginFramework;
using ScrewTurn.Wiki;
using System.Text.RegularExpressions;
namespace DevCentral.ScrewTurnProviders
{
@skoon
skoon / githg.ps1
Created January 25, 2012 23:44
Git/HG profile
if (test-path function:\prompt) {
$oldPrompt = ls function: | ? {$_.Name -eq "prompt"}
remove-item -force function:\prompt
}
function prompt {
function getGitStatus {
$branch = git branch 2>&1
if($branch.Exception -eq $null) {
$status = "git"
$branch | foreach {