Skip to content

Instantly share code, notes, and snippets.

// Hyperlinks e.g. http://www.server.com/folder/file.aspx
Regex rxURL = new Regex(@"(\b(?:http|https|ftp|file)://[^\s]+)", RegexOptions.IgnoreCase);
rxURL.Match(strClipboardText);
foreach (Match rm in rxURL.Matches(strClipboardText))
{
if(!_hyperlink.Contains(rm.ToString()))
{
_hyperlink.Enqueue(rm.ToString());
@alexgman
alexgman / anothervimrc
Created July 24, 2015 23:03
yet another beauitful vimrc file
" Turn on syntax highlighting
syntax on
" No need for compatible mode
set nocompatible
colorscheme colorful256
set showmatch
set ignorecase
set showmode
@alexgman
alexgman / hugeVIMRC
Created July 23, 2015 15:10
shagou;s vimrc file. just wanted to have it because it's huge
"---------------------------------------------------------------------------
" Shougo's .vimrc
"---------------------------------------------------------------------------
" Initialize:"{{{
"
" Enable no Vi compatible commands.
set nocompatible
let s:is_windows = has('win16') || has('win32') || has('win64')
@alexgman
alexgman / ColumnRemover.sh
Last active August 29, 2015 14:25 — forked from martinbpeters/ColumnRemover.sh
remove everything except 2nd column
#!/bin/sh
cat $1 | awk '{ $2="";print}' >> $2
paste <(awk '{print $1;}' gtemp) <(cut -f1 gfields)
grep HOGE * | awk '{print $1}' | awk -F : '{print $1}' | uniq
@alexgman
alexgman / split_fasta
Last active August 29, 2015 14:25 — forked from cfljam/split_fasta
d
awk '/^>/{s=++d".fasta"} {print > s}'
awk -F\" '{print NF-1}' <fileName>
@alexgman
alexgman / awk_concat
Last active August 29, 2015 14:25 — forked from fak/awk_concat
awk FNR-1 *.txt > target.txt
@alexgman
alexgman / script.sh
Last active August 29, 2015 14:25 — forked from manfe/script.sh
awk '{ if( NR > 2 ) { print } }' file > outputfile