tag(s):
home | create snippet | email feedback | submit page to:   digg   de.licio.us   reddit
Welcome to snippetvault.com.
This site is a repository of useful code snippets that others might find useful.
Why?
  1. They work in too many languages and can't remember something simple.
  2. They want a central place to store their samples and what better place than online.
  3. They don't want to bother registering on some other website.
  4. They want to help fellow coders do simple things without scouring Google.
Total of 39 snippets in the vault.
1 2 3 ... 8
most recent background process pid
osascript start.applescript &> /dev/null & echo $!
view | create response snippet | comment (0)

Tag(s): bash applescript background process

average values in column in awk
awk '{sum+=$1} END { print sum/NR}' <filename>
view | create response snippet | comment (0)

Tag(s): average awk

split on single character delimeter
String t = "abc/def//ghi/zyx/gfe/idka////red";
string[] a = Regex.Split(t, @"(?<!/)/(?!/)");
view | create response snippet | comment (0)

Tag(s): c# split regex single_delimeter

Open OS X application with sudo
sudo open /path/to/program.app
view | create response snippet | comment (0)

Tag(s): os x, sudo, root

regenerated debian system wide ssh keys
rm -f /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_key /etc/ssh/ssh_host_dsa_key  
ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1  
ssh-keygen -q -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa  
ssh-keygen -q -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa  
/etc/init.d/ssh restart  
view | create response snippet | comment (0)

Tag(s): debian server ssh bash

1 2 3 ... 8
© 2007 ddm productions