This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RepoConfiguration : Registry { | |
public RepoConfiguration() { | |
Scan(scan => { | |
scan.AssembliesFromApplicationBaseDirectory(); | |
scan.AddAllTypesOf<IRepository>().NameBy(type => type.Name.Replace("Repository", string.Empty)); // register SqlServerRepository with name SqlServer | |
}); | |
For<IRepository>().Use<SqlServerRepository>(); // define a default for no name calls | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery Tiny Pub/Sub - v0.X - 11/18/2010 | |
* http://benalman.com/ | |
* | |
* Original Copyright (c) 2010 "Cowboy" Ben Alman | |
* Dual licensed under the MIT and GPL licenses. | |
* http://benalman.com/about/license/ | |
* | |
* Made awesome by Rick Waldron | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
using NUnit.Framework; | |
namespace GitHash.Tests | |
{ | |
[TestFixture] | |
public class HashingTests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
import webbrowser | |
class ExampleCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
url = self.view.file_name() | |
webbrowser.open_new(self.view.file_name()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# OpenSSL requires the port number. | |
SERVER=localhost:443 | |
DELAY=1 | |
echo -n Testing ssl2... | |
result=$(echo -n | openssl s_client -ssl2 -connect $SERVER 2>&1) | |
if [[ "$result" =~ "Cipher :" ]] ; then | |
echo supported. INSECURE! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[branch] | |
autosetuprebase = always | |
[alias] | |
co = checkout | |
cb = checkout -b | |
ci = commit -m | |
s = status -s | |
br = branch | |
unstage = reset . | |
aa = !"git add -A . && git status -s" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing the virtualbox guest additions | |
VBOX_VERSION=$(cat /etc/vagabond/vbox_version) | |
cd /tmp | |
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso | |
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt | |
sh /mnt/VBoxLinuxAdditions.run --nox11 | |
umount /mnt | |
rm VBoxGuestAdditions_$VBOX_VERSION.iso | |
unset VBOX_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/.ssh | |
cat > ~/.ssh/authorized_keys<<EOF | |
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAijGY3BBjONqbfTtgyPXS56Wb3w8+4BtMSvdf5L7gKI7FkeKSTNIBDkMfBT0yyslvwQZAuVVqiqV1elybUN45xgBj/Xrkzilg49WgRTRlo8wxjcZRbtMaoK0tAOHIFBBlxcAt/GAlvQOILOtLC0djEyJ2fbnFLUrZAdjqkFAz0RY/qsVU3MSA3PukcgzB/aj9VARD/dctoWSZW8C38IChRddMfayy7V0qLCUA9wZ5eZIRCE6LqTZyV3nDyPKl42H8O3DGoCEnfPaBdMema3QWcQ7dZ5UT8I4VO5dF0mvCN2dL81LeyqLlhvohM15YUPTfYXJudMHZNBq5SN2sLdjuTQ== [email protected] | |
EOF | |
sudo -i | |
# Apt-install various things necessary for Ruby, guest additions, | |
# etc., and remove optional things to trim down the machine. | |
apt-get -y update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git | |
su - git | |
cd ~ | |
apt-get -y install git-core | |
git clone git://github.com/sitaramc/gitolite | |
gitolite/install -ln /usr/local/bin | |
# copy public key to ~/id_rsa.pub | |
cp ~/id_rsa.pub /home/git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant basebox templates | |
vagrant basebox define ubuntu-12.10 'ubuntu-12.10-server-amd64' | |
vagrant basebox build ubuntu-12.10 | |
vagrant basebox validate ubuntu-12.10 | |
vagrant basebox export ubuntu-12.10 | |
vagrant box add ubuntu-12.10 ubuntu-12.10.box | |
vagrant init ubuntu-12.10 |
OlderNewer