Skip to content

Instantly share code, notes, and snippets.

View rarous's full-sized avatar
💭
I may be slow to respond.

Aleš Roubíček rarous

💭
I may be slow to respond.
View GitHub Profile
@maio
maio / gist:2862867
Created June 3, 2012 09:58
Smart semi-colon in Emacs (and Vim)
;; Port of Coderush's smart semi-colon feature to Emacs
;;
;; When I hit semi-colon anywhere, Emacs will move cursor to the end of current
;; line and insert semi-colon (if it's not already there).
;;
;; Idea from last @CoderetreatCZ - HK
(defun maio/electric-semicolon ()
(interactive)
(end-of-line)
'@adent Přesun mailu, na který je odpovídáno, do složky vyřízeno. Testováno v Outlooku 2007.
'Kód v ThisOutlookSession, dirty and cowboy coding compatible VB
Private Sub Application_ItemSend(ByVal item As Object, Cancel As Boolean)
Dim replyMail As mailItem
Set myDoneFolder = Application.Session.Folders("Personal Folders").Folders("Vyrizeno")
@kolman
kolman / gist:1427422
Created December 3, 2011 15:48
Game of Life rules
module CodeRetreat
open Xunit
type Cell =
| DeadCell of int
| LiveCell of int
let hasChanceToLife (cell:Cell) =
match cell with
@rarous
rarous / ControllersInstaller.cs
Last active September 23, 2015 17:08
Minimalistická ukázka integrace Windsor Containeru do webové aplikace
public class ControllersInstaller : IWindsorInstaller {
public void Install(IWindsorContainer container, IConfigurationStore store) {
container.Register(
Classes.
FromThisAssembly().
BasedOn<IController>().
LifestyleTransient(),
Component.
@woloski
woloski / CloudQueueCacheDependency.cs
Created June 27, 2010 00:16
Invalidate ASP.NET Cache using a Windows Azure queue
namespace Southworks.WindowsAzure
{
using System;
using System.Web.Caching;
/// <summary>
/// Represents a cache dependency that uses Windows Azure queues to detect if an item in cache has changed
/// </summary>
/// <remarks>Sending a message a certain queue (specified using the <see cref="CloudQueueCacheDependencyMonitor" />) will invalidate the cache item </remarks>
/// <example>