Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.IO;
using FluentNHibernate;
using FluentNHibernate.AutoMap;
using FluentNHibernate.Cfg.Db;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Context;
using NHibernate.Event;
@danmackinlay
danmackinlay / supervisord.sh
Created August 27, 2009 07:07
an init.d script for supervisord
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@jonhilt
jonhilt / rakefile.rb
Created May 19, 2010 12:53
A simple Rake build script example
require 'albacore'
require 'fileutils'
PROJECT_NAME = "Your Project Here"
DOT_NET_PATH = "C:/Windows/Microsoft.NET/Framework/v4.0.30319/"
NUNIT_PATH = "Tools/nunit/"
MSPEC_PATH = "Tools/mspec/"
PROJECT_CONFIG = (ENV['PROJECT_CONFIG'] == nil) ? "Debug" : ENV['PROJECT_CONFIG']
COMPANY_NAME = "Your Company Here"
BUILD_NUMBER = (ENV['BUILD_NUMBER'] == nil) ? "1.0.0.0" : ENV['BUILD_NUMBER']
#!/usr/bin/env bash
# where do you want couchdb and its deps to be installed
COUCHDB_PREFIX="/opt/couchdb-1.0.1"
# Let's determine the correct arcitecture and choose the installer
if [ "`uname -m`" = "x86_64" ]; then
echo "Using 64-bit installer"
COUCHDB_INSTALLER_DOC_ID="26f246a0fe23d6a53d5326713308f43c"
COUCHDB_INSTALLER_BIN="install-couchdb-1.0.1_rel1-linux-x64.bin"
@lifeeth
lifeeth / selenium.sh
Created February 8, 2011 18:09
selenium init.d script for debian
#!/bin/bash
# /etc/init.d/selenium
# debian-compatible selenium-grid startup script.
# Based on jenkins startups
# Praneeth Bodduluri <lifeeth[at]gmail.com>
# update-rc.d -n -f selenium start 90 2 3 4 5 . stop 10 0 1 6 .
### BEGIN INIT INFO
# Provides: selenium-grid
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
@ntotten
ntotten / Global.asax.cs
Created February 10, 2011 16:59
Multi-Tenant Facebook Application
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
// Register your multi-tenant application on app startup
FacebookApplication.SetApplication(new MultiTenantFacebookApplication());
}
}
anonymous
anonymous / gist:852307
Created March 3, 2011 03:58
using System;
using System.Collections.Generic;
using System.Web;
using NHibernate;
using NHibernate.Context;
using NHibernate.Engine;
namespace WebHub.Infrastracture.SessionManagement
{
@codeprogression
codeprogression / rakefile.rb
Created March 20, 2011 20:46
basic rakefile for building and deploying an asp.net web application
require 'rubygems'
require 'erb'
require 'fileutils'
require 'find'
require 'rake'
require 'rake/tasklib'
task :default do
package_location="sample/" # website folder location relative to checkout root
project_file = "sample/sample.csproj" # website project location relative to checkout root
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

function PagnationStr(totalPgs, currentPg)
{
var pageSet = 10,
indexUrl = "//mydomain.com/page/",
tmp = "<div class=\"pagination\"><ul>",
maxpage = currentPg + 9,
crtarget = currentPg,
i = 0;