|
|
http://www.scootersoftware.com/support.php?c=kb_vcs.php
1. In Visual Studio Choose Options from the Tools menu.
2. Expand Source Control in the treeview.
3. Click Visual Studio Team Foundation Server in the treeview.
4. Click the Configure User Tools button.
5. Click the Add button.
6. Enter “.*” in the Extension edit.
7. Choose Compare in the Operation combobox.
8. Enter the path to BComp.exe in the Command edit.
9. In the Arguments edit, use:
%1 %2 /title1=%6 /title2=%7
Here is an extension / plugin for mediawiki to authenticate against a Radius server. I couldn’t find one anywhere else, which is surprising. I can’t believe I am the first person to want to do this. Anyway, this is just bare bones, but it works for an internal mediawiki setup.
First, get Pure PHP radius class 1.2.2 from http://developer.sysco.ch/php. This does the actual radius authentication. Put radius.class.php in wiki/extensions/ (assuming wiki is your mediawiki install). There is probably a better place to put it, but I was setting this up for internal use and wanted to get it working quickly.
Next, create wiki/extensions/RadiusAuthPlugin.php. Make sure you fill in RADIUS_SERVER, SHARED_SECRET, and NAS_IP_ADDRESS with your actual information
<?php
require_once('AuthPlugin.php');
require_once('radius.class.php');
error_reporting(E_ALL);
class RadiusAuthPlugin extends AuthPlugin
{
function userExists($username)
{
return TRUE;
}
function authenticate($username, $password)
{
$username = strtolower($username);
$radius = new Radius('RADIUS_SERVER', 'SHARED_SECRET');
$radius->SetNasIpAddress('NAS_IP_ADDRESS'); // Needed for some devices (not always auto-detected)
if ($radius->AccessRequest($username, $password))
{
return TRUE;
}
return FALSE;
}
function modifyUITemplate(&$template)
{
$template->set('usedomain', FALSE);
$template->set('useemail', FALSE);
$template->set('create', FALSE);
}
function autoCreate()
{
return TRUE;
}
function validDomain($domain)
{
return TRUE;
}
function updateUser(&$user)
{
return TRUE;
}
function allowPasswordChange()
{
return FALSE;
}
function setPassword($password)
{
return FALSE;
}
function updateExternalDB($user)
{
return FALSE;
}
function canCreateAccounts()
{
return FALSE;
}
function adduser($user, $password)
{
return FALSE;
}
function strict()
{
return TRUE;
}
function initUser(&$user) { }
}
$wgExtensionCredits['other'][] = array(
'name' => 'RadiusAuthPlugin',
'version' => '1.0.0',
'author' => 'James Young',
'description' => 'Automatic login with a RADIUS server'
);
Lastly, put this in your LocalSetup.php:
require_once("./extensions/RadiusAuthPlugin.php");
$wgAuth = new RadiusAuthPlugin();
$wgGroupPermissions['*']['createaccount'] = false;
Had the desire to open files from the command line (a cygwin terminal, mintty, to be specific) into my existing session of Visual Studio 2008. Here is what you can do.
Adjust paths as necessary. Put this in your bash profile:
export PATH=$PATH:/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 9.0/Common7/IDE/
alias devedit="devenv \$1 /edit"
Now, this gives you two tools. Well, one, but two will be available on the command line.
The main tool you now have is devenv, which allows you to do all sorts of things. type devenv /? to see all the things you can do with it.
We are interested in devenv filename /edit. I would prefer to just type the filename, and not need to type /edit everytime. The alias devedit takes care of this for us. So, you can do devenv whatever to have access to all the features that tool gives you, and you can do devedit filename to quickly open up the file in your existing Visual Studio session. If there is no session running, it will start one up.
So I got a new Dell through work with Vista installed. Naturally one of the first things I did was install cygwin so I can use mintty. This gives me a decent terminal on widnows. If you don’t know what those are, I encourage you to give them a shot.
Anyway, having used a mac forever, I found myself missing the ‘open’ command that you can do from Terminal (on the mac) to pop open a window from the directory you are in.
With a quick search, I found that someone else already figured this out, so I am going to post my version of it here:
In your .bash_profile, add this:
alias open="cygstart \$1"
Then in mintty (or any cygwin terminal) you can cd to where ever you want, then just do ‘open [path]‘ and it will pop open a windows window for [path].
Examples:
- open current directory:
$ open .
- open home directory :
$ open ~
- open program files:
$ open ~/c/Program\ Files
Note: that last one assumes you have made a symlink in your home to /cygdrive/c/
$ cd ~; ln -s /cygdrive/c
Here is the original thread that I found this tip in:
http://cygwin.com/ml/cygwin/2002-09/msg00632.html
There are a few solutions posted, my favorite is:
http://cygwin.com/ml/cygwin/2002-09/msg00635.html
" vim 7.x specific
" set to be more vim like
set nocompatible
" check paths for .ros alternatives
set includeexpr=substitute(v:fname,'$','.ros','g')
" hide buffers when they go away with :bd
set hidden
" set tabs
set expandtab
set tabstop=4
set shiftwidth=4
set autoindent
set cindent
" window management
set number
set ruler
set showmode
set laststatus=2
set history=500
set cursorline
au WinLeave * set nocursorline
au WinEnter * set cursorline
" search
set incsearch
set hlsearch
set smartcase
" colors
syntax on
colorscheme desert
set showmatch
au BufRead,BufNewFile *.ros set filetype=php
au BufRead,BufNewFile *.js.ros set filetype=javascript
au BufRead,BufNewFile *.css.ros set filetype=css
highlight Comment ctermfg=6
highlight Folded ctermfg=7 ctermbg=0
highlight LineNr ctermfg=6 ctermbg=0
" misc
set title
set sc
" use wildmenu
set wildmenu
set wildmode=list:longest,full
set wildignore+=*.0,*.class,*.pyc,*.pyo,*/CVS/,*.jar
" turn word wrap off
set nowrap
" get the backup files in ~/.tmp/
"#set backupdir=~/.tmp/
"set directory=~/.tmp/
" folding
set foldmethod=marker
" If I remember correctly this makes C-k look up things in php_doc
set keywordprg=/[path to]/php_doc
" hide the mouse while typing
set mousehide
This .screenrc has a bunch of commented out lines that I don’t use, but I know if I delete them, I will need them for some reason and wish I didn’t.
# Use CTRL-<space> as the escape sequence instead of CTRL-A
# this seems to only work on certain machines
escape '^@^@'
# Use ` as the escape sequence instead of CTRL-A
#escape ``
# Once you learn to use the screen scrollback, you'll never scroll in terminal again!
defscrollback 20000
# Aesthetic Stuff
vbell off
hardstatus alwayslastline
hardstatus string "%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]"
#hardstatus string '%{= kc}%H%{g} %{kw}%?%-Lw%?%{W}%n%f%t%?(%u)%?%{w}%?%+Lw%?%=%{c}%m/%d %C %{w}%l%'
#hardstatus string '%{= cK}%-Lw%{= KW}%50>%n%f* %t%{= cK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]'
# Rebind PuTTY <C-?> (127) backspace to <C-H>
bindkey -k kD stuff ^H
# Rebind PuTTY <del> to <right><backspace>
#bindkey "^[[3~" stuff ^[OC^H
term xterm-color
setenv SCREEN_TERM screen
startup_message off
#termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
#termcapinfo xterm-color Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l
Sorry, this has to be edited for security reasons…
Host [hostname1] [hostname2] [hostname3]
ProxyCommand ssh [hostname] /usr/local/bin/nc -w 5 %h %p
Host [hostname1] [hostname2] [hostname3]
Compression yes
# defaults
Host *
Protocol 2,1
PubkeyAuthentication yes
RSAAuthentication yes
PasswordAuthentication yes
PreferredAuthentications publickey,password,keyboard-interactive
ForwardAgent yes
ForwardX11 no
ServerAliveCountMax 3
ServerAliveInterval 600
Host [hostname]
HostName [ip address]
Port [port number]
User [username]
.bash_profile, .profile, .bash_rc …
if [ "$PS1" != "" ]; then
PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME}: ${PWD}\007"'
PS1="[\e[1;33m\u::${HOSTNAME} \t\[\e[1;35m\e[0m\]]$ "
fi
alias ls='ls -G'
alias ll='ls -l'
alias la='ll -a'
alias env='env | sort'
alias ..='cd ..'
alias :e=vim
alias grepr='grep -rHn'
# finds and removes the ._ files that textmate creates
alias findmatefiles='find . -name ._*'
alias rmmatefiles='find . -name ._* -exec rm {} \;'
export DEVROOT=~/dev/
export HISTFILE=$HOME/.bash_history
export HISTSIZE=5000
export PATH=$HOME/bin:/Applications/MAMP/bin:/Applications/MAMP/Library/bin:/home/y/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/y/sbin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/mysql/bin:.
export GREP_OPTIONS='--color=auto'
setenv () { export $1="$2"; }
unsetenv () { unset $*; }
The app: http://psyjinx.com/iphone/
This is a very simple webapp. It displays images that iPhones and iPod Touches can use as wallpaper. There isn’t really a need for offline use with the iPhone, but the iPod Touch could benefit from it. It took me about 10 minutes to learn what to do, and implement it for full offline use. The key to making a web app work offline is to add a manifest file.
Continue reading Example of an offline web app »
|
|