Skip to content

Instantly share code, notes, and snippets.


Alexander Zeitler AlexZeitler

View GitHub Profile
View gist:8ec79af984b8a1024ab1
  1. Wget
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
# This script is originally from
export build=~/devtools # or wherever you'd like to build
AlexZeitler / gist:4894f93c935c0f7c1495
Last active Sep 7, 2015 — forked from kagemusha/gist:5866759
Using Debugger with Grunt
View gist:4894f93c935c0f7c1495
version: grunt-cli v0.1.8
1. Install node-inspector globally (-g)
npm install -g node-inspector
2. Add debugger statements to your code
3. Run your grunt task in debug mode
AlexZeitler / gist:b8f0debac6bead7fda18
Last active Sep 18, 2015 — forked from benfoster/gist:4416655
A lightweight message bus using TPL DataFlow
View gist:b8f0debac6bead7fda18
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
namespace TDFDemo
class Program
AlexZeitler / gist:076810d466fe44b5efe8
Last active Sep 19, 2015 — forked from six8/gist:1732686
Javascript dependency graph resolution
View gist:076810d466fe44b5efe8
// Dependency resolution, adapted from
function resolve(graph) {
var sorted = [], // sorted list of IDs ( returned value )
visited = {}; // hash: id of already visited node => true
// 2. topological sort
Object.keys(graph).forEach(function visit(name, ancestors) {
if (!Array.isArray(ancestors)) ancestors = [];
visited[name] = true;
AlexZeitler / gist:3323794
Created Aug 11, 2012 — forked from benfoster/gist:3304337
Performing one time migrations with RavenDB
View gist:3323794
class Program
static void Main(string[] args)
Console.WriteLine("Starting migration.");
using (var store = new DocumentStore { ConnectionStringName = "RavenDb" }.Initialize())
using (var session = store.OpenSession())
AlexZeitler / fstab
Created Aug 11, 2012 — forked from agross/fstab
fstab for cygwin / git file permissions
View fstab
# For a description of the file format, see the Users Guide
D:/Users/agross/Downloads /scratch ntfs binary,posix=0,noacl 0 0
D:/Users/agross/Projekte/GROSSWEBER /gw ntfs binary,posix=0,noacl 0 0
D:/Users/agross/Coding/.NET /play ntfs binary,posix=0,noacl 0 0
D: /d ntfs binary,posix=0,noacl 0 0
C: /c ntfs binary,posix=0,noacl 0 0
C:/Cygwin/bin /usr/bin ntfs binary,posix=0,noacl 0 0
C:/Cygwin/lib /usr/lib ntfs binary,posix=0,noacl 0 0
AlexZeitler / gist:3323791
Created Aug 11, 2012 — forked from mattwarren/gist:2584969
Indexed properties for RavenDB
View gist:3323791
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition.Hosting;
using Lucene.Net.Documents;
using Raven.Abstractions.Data;
using Raven.Abstractions.Indexing;
using Raven.Client;
using Raven.Client.Embedded;
using Raven.Client.Indexes;
using Raven.Client.Linq;
AlexZeitler / fake-http-context.cs
Created Oct 5, 2012 — forked from frankshearar/fake-http-context.cs
A Moq-using fake HTTP context to test controllers.
View fake-http-context.cs
public HttpContextBase FakeHttpContext() {
var context = new Mock<HttpContextBase>();
var files = new Mock<HttpFileCollectionBase>();
var request = new Mock<HttpRequestBase>();
var response = new Mock<HttpResponseBase>();
var session = new Mock<HttpSessionStateBase>();
var server = new Mock<HttpServerUtilityBase>();
var user = new Mock<IPrincipal>();
var identity = new Mock<IIdentity>();
request.Setup(req => req.ApplicationPath).Returns("~/");
View AdvancedKnockout.js
var UserModel = function () {
var self = this;
// Somewhat sophisticated loading flag that supports parallel loading of multiple endpoints.
self.loading = ko.observableArray();
// Encapsulating the entire form in a property, so we can use ko.mapping in a safe way.
// If properties were directly on the model, we'd have to re-init model every time we
// load data, which could lead to unwanted consequences.
self.user = ko.observable();
You can’t perform that action at this time.