July 20, 2012
July 19, 2012
March 26, 2012
March 15, 2012
WHERE clause on SQL Server “Text” data type
SELECT * FROM @Village WHERE [CastleType] like 'foo'  SELECT * FROM [Village] WHERE PATINDEX('foo', [CastleType]) <> 0
How to Escape Single Quotes in SQL2005
To fix the error mentioned above, escape single quotes with two single quotes as displayed in following example.
USE AdventureWorks
GO
SELECT *
FROM Person.Address
WHERE City = 'Villeneuve-d''Ascq'
GO
March 12, 2012
Reply above quoted message
The mail.identity.default.reply_on_top preference sets the default value for the reply text position for each account/identity. It defaults to 0, to have the reply at the bottom. You can use the Config Editor at Tools -> Options -> General to set it to 1 to have the reply on top.
March 11, 2012
Move all numbers from “Other Phone” to “Mobile Phone” field in Outlook contacts
Use Powershell to run this script
$outlook = new-object -com outlook.application
$contacts = $outlook.Session.GetDefaultFolder(10)
$contacts.Items | % { if($_.MobileTelephoneNumber -eq "") { $_.MobileTelephoneNumber = $_.OtherTelephoneNumber; $_.OtherTelephoneNumber = ""; $_.save() } }
Move all numbers from “Other Phone” to “Mobile Phone” field
Use Powershell to run this script
$outlook = new-object -com outlook.application
$contacts = $outlook.Session.GetDefaultFolder(10)
$contacts.Items | % { if($_.MobileTelephoneNumber -eq "") { $_.MobileTelephoneNumber = $_.OtherTelephoneNumber; $_.OtherTelephoneNumber = ""; $_.save() } }
openldap notes
ldapadd -x -D "cn=jimbob,dc=example,dc=com" -f step-1.ldif -w dirtysecret
slapd -d 63 -h "ldap:/// ldaps:///"
ldapadd -D "cn=sfitel, dc=my, dc=com" -f step-1.ldif -w cook
March 10, 2012
Sync Gmail and MS Outlook contacts
1_ Contact Sync – get free version here - http://www.pppindia.com/contacts-sync/index.html
2_ MS Outlook Add-In – get free version here - http://scand.com/products/outlook4gmail/install.html
Good Luck.
February 28, 2012
February 27, 2012
find all file extensions used under some directory
# Not sure, what this is good for - however this is asked sometimes.
# I specifically exclude "dotfiles" and only consider files of the form "foo.bar" (i.e. we
# don't consider filenames without an "inner dot" at all)
find . -type f -name '[^.]*.*' \
-exec bash -c 'printf "%s\n" ${@##*.}' _ {} + | sort -u
# (or ... | sort | uniq, in case the sort lacks -u, which is a GNUism)
# Of course it's trivial to do it non-recursively:
for f in *.*; do printf "%s\n" "${f##*.}"; done | sort -u
# or recursively again, with a bash4 associative array, including
# a count for each extension (no sorting here):
unset a; declare -A a
while IFS= read -r ext; do
((a[$ext]++))
done < <(find . -type f -name '[^.]*.*' \
-exec bash -c 'printf "%s\n" ${@##*.}' _ {} +)
for ext in "${!a[@]}"; do
printf "'%s' (%s)\n" "$ext" "${a[$ext]}"
done
# NOTE: all methods above fail, if an extension contains embedded newlines.
@credit goes to http://snipplr.com/view.php?codeview&id=26672
howto import maildir mails to thunderbird
--script to change extensions of file from [EXTENSION] to eml
#!/bin/bash
for i in *. [EXTENSION] *
do
e=`echo $i | sed 's/. [EXTENSION] $/.eml/'`
cp $i $e
done
++++++++additional help - this will replace extensions in the script
--sed -i 's/\[EXTENSION\]/debian/g' convert.sh
\\ change \[EXTENSION\] to whatever extension you need
2_ drag&drop files with eml extension to inbox folder in thunderbird
February 26, 2012
как изменить сервер обновлений в nod32 v.5 home
February 23, 2012
find files containing "a search string" + filter out last 3 records and delete the rest
February 16, 2012
fix 'bird language' in song name with cyrillic letters
http://code.google.com/p/as-convert-russian
February 10, 2012
February 8, 2012
February 4, 2012
copy and paster for xterm
XTerm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)
February 3, 2012
purge all packages from the list
dpkg --list |grep "what_you_are_looking_for" | cut -d " " -f 3 | xargs sudo dpkg --purge
February 2, 2012
extract tar achieve to desired location
tar -xvzf filename.tar.gz -C /desired/path
This command will extract(-x) verbosely(-v) tar gz(-z) file(-f) to the desired location
February 1, 2012
search for a string in a file and remove such file
January 31, 2012
How to type letters with accent
Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/
- 
Для того чтобы изменить сервер обновлений или подключить локальную папку зеркала необходимо - открыть реестр и в соответствующих ветках пр...
 - 
replaced ukrainian "І" with ukrainian "И" https://drive.google.com/drive/folders/1G034a_BPxs0YVFWivjGZjeAyj-jefYNJ if yo...
 - 
plugins are for eap are missing: apt-get install strongswan-plugin-eap-mschapv2