A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
public class ಠ_ಠAttribute : Attribute | |
{ | |
public ILog Log { get; set; } | |
public ಠ_ಠAttribute() | |
{ | |
Log.Info("This code is bad and you should feel bad"); | |
} | |
} |
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
public class ಠ_ಠAttribute : Attribute | |
{ | |
public ILog Log { get; set; } | |
public ಠ_ಠAttribute() | |
{ | |
Log.Info("This code is bad and you should feel bad"); | |
} | |
} |
A Git alias to quickly check out a Pull Request branch in a single move. ⚡
git config --global alias.cpr '!f() { git fetch --quiet ${GIT_DEFAULT_REMOTE-origin} pull/$1/head:pulls/$1 && git checkout pulls/$1; }; f'
# Generator for valid Swedish personnummer: http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden) | |
# By Henrik Nyh <http://henrik.nyh.se> 2009-01-29 under the MIT license. | |
require 'date' | |
module Personnummer | |
def self.generate(date=nil, serial=nil) | |
date ||= Date.new(1900+rand(100), 1+rand(12), 1+rand(28)) | |
serial = serial ? serial.to_s : format("%03d", 1+rand(999)) # 001-999 |
{-# LANGUAGE ApplicativeDo #-} | |
{-# LANGUAGE ConstrainedClassMethods #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE IncoherentInstances #-} | |
{-# LANGUAGE InstanceSigs #-} |
+--------------------+--------------------+-------------------------+--------------------+
|Operation | F#+ / F# |F#+ Haskell Compatibility|Haskell |
+====================+====================+=========================+====================+
|List.append | @ | | ++ |
+--------------------+--------------------+-------------------------+--------------------+
|Function composition| f << g | f . (g) | f . g |
+--------------------+--------------------+-------------------------+--------------------+
| | <| | $ | $ |
+--------------------+--------------------+-------------------------+--------------------+
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>com.rabbitmq.rabbitmq-server</string> | |
<key>Program</key> | |
<string>/usr/local/sbin/rabbitmq-server</string> |
#r @"bin\debug\FsControl.Core.dll" // from https://github.com/gmpl/FsControl | |
open System | |
open FsControl.Core.Abstractions | |
// generic composition operators for all categories | |
let inline (>>) g f = Inline.instance (Category.Comp, f) g | |
let inline (<<) f g = Inline.instance (Category.Comp, f) g | |
// Lens definition |
+----------------------+--------------------+--------------------+--------------------+
| Operation | F-Sharp | Compability | Haskell |
+======================+====================+====================+====================+
| List.append | @ | | ++ |
+----------------------+--------------------+--------------------+--------------------+
| Function composition | f << g | f . (g) | f . g |
+----------------------+--------------------+--------------------+--------------------+
| | = | == | == |
+----------------------+--------------------+--------------------+--------------------+
public class Executor : ReceiveActor | |
{ | |
readonly Kernel _kernel; | |
public Executor(Kernel kernel) | |
{ | |
_kernel = kernel; | |
Receive<Tuple<Command,ActorRef>[]>(ExecuteCommands); | |
} | |
private bool ExecuteCommands(Tuple<Command,ActorRef>[] tuples) |