Useful Links
A collection of Useful and sometimes Useless links
Online help to my Citizen Eco Drive
The Official Website Of Harvard Symbologist Robert Langdon from Da Vinci Code
And I bet Robert Langdon could have shed light on this PHI
From Zappor at dealsea.com
How to get the LOWEST price at Priceline.com
Credit goes to wavek9
This will work on all the areas of www.priceline.com where you can name your own price but below I will describe it with hotels. I have been able to get the lowest price on hotels this way many times. I have stayed at a Sheraton Suites for $30 a night and also at Radisson, Marriot, Four Points, and Regular Sheratons which were all considered 3 star hotels.
This is how it is done and it may require some work but this will get you the lowest price possible. I did this sample as selecting an only specific area with 3 stars but if you have multiple areas with 3 stars then that will obviously increase your chances. If you run out of crappy areas (2 1/2 and below) then just make another fake id again.
-------------------------------------------------------
SO LETS BEGIN ON GETTING A HOTEL FOR LESS:
1. Type the City of Interest
2. Try to get a major city such as Atlanta, GA
3. Figure out which areas have hotels for 2 1/2 stars or lower
(Just simply check a box and hit next and then hit the back button)
4. Select the area with 3 stars you want to stay at.
5. Name your price at $25.00
6. Enter a made up name you can remember such as John Smith
7. It may ask you again for price so hit the SKIP PAGE
8. Enter the initials of John Smith which would be JS
Now the fun part begins
9. Enter a real credit card number BUT WITH A FAKE EXPIRATION DATE and CODE
(This will prevent priceline from charging your account)
10. Name: John Smith
11. Billing: Address 20 John Lane
12. City: Beverly Hills, CA 90210
13. Phones 555-123-4567
14. Email johnsmith@fakeemail.com
15. Click BUY MY HOTEL ROOM NOW
This is where it will do the search but your result may
end up being "We're sorry, but we couldn't find a hotel..."
So this is where we try again.
16. Remember those 2 1/2 stars and lower hotels you picked?
17. Select one of those crappy hotels with your checked 3 star selection
18. Enter this time $35.00 and click NEXT
19. Then click Skip this PAGE
20. Initial it JS and click buy my hotel
You will increment the hotel price by $5.00 each time
until accepted and repeating steps 16 to 20.
How do you now your price was accepted? Simple they will
have an error trying to process your card when they have
found a hotel that accepts your price. They will ask you
to enter your credit card information again where this time
you will make a note of the price accepted and then sign
up with your real name and account information.
Example of message:
"We're sorry, the card you provided is expired or the expiration date you entered does not match..."
21. After you see this message just CLOSE ALL INTERNET WEBPAGES.
22. Go back to www.priceline.com and name your own price for the hotel
23. Select the hotel you guessed correctly for.
24. Enter the winning price and real info from now on.
You will get an error though after you submit your price which will be:
"We were not able to process this request since our records indicate you have already made a request for this same trip."
This is okay just simply add an area with a crappy hotel but with your 3 star still selected and repeat the process.This time it will run your purchase through and you just got the lowest price on www.priceline.com
Changing the extension on multiple files in UNIX
A friend emailed me today asking if there was a quick and easy way to change the extension on multiple files. Thanks to the power of the programmable Unix shell, there is. For your reference, here's my unoriginal solution to his problem (changing all files ending in .mod to .mpg).
sh -c 'for f in *.mod; do mv "$f" "$(echo $f | sed s/.mod$/.mpg/)"; done'
Thanks to Micah
Real World Experience
I typically find myself performing edits on multiple files on a daily basis. So much so that I created two aliases in my login scripts ( vils and vif) that get the files I need by simply masking the files to the aliases I set up:
alias vils 'vi `ls -1 !*`'
alias vif 'vi `find . -print -type -f | grep \!*`'
From: http://www.umiacs.umd.edu/~jusub/unix-hints-and-hacks/19270121.htm
Specific to UNIX.
Scenario: Working on UNIX we often have to grapple with the situation when we have to change/edit one single word/line in multiple files. It can be an arduous task to open each file and make the same change over and over again. Here is a very neat solution to the problem, which I personally find life changing. One single UNIX command does it all.
$] sh -c 'for f in *.sp; do (sed "s/str_old1/str_new1/g;s/str_old2/str_new2/g" "$f" > "$f".1); mv "$f".1 "$f"; done'
What it does: This command operates on all .sp files. So you can accordingly change the extension to .pl/.mat/.dat etc
It opens the file using the stream line edition sed and changes the str_old1 in the file to str_new1. This is the real power of sed, so now you can change the library name/model name/any other string in the file to any other library name/model name/any other string with out opening the file! In this example I have changed two strings, say pmos_htv to pmos_rvt and nmos_hvt to nmos_rvt. Obviously you can extend this to any number of changes. Also note that I have overwritten the original file here, you can alternatively use cp to create new files.
sed is a very powerful command and you can find several advanced examples of it on this link
ps: If you are a vim use you will instantaneously see the similarities between sed and vim, thus user of vim will find this a lot easier.
Hope this helps everyone,
Mayank
Shell Script to do the above job, on single and multiple files
#!/bin/bash
# Author- Mayank Gupta
# Date 17th Aug, 2006
# Display the usage of the file
case "$#" in
0 ) echo -e "\033[31mERROR: insufficent inputs"
echo '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
echo 'Usage: sub old_string new_string file_name[s]
Substitutes old_string with new_string in the given File'
echo -e "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
\033[0m "
exit 1;;
esac
# Read in the old_string
old_word=$1
# Read in the new_string
new_word=$2
# We now get ride of old_string and new_string
shift;shift;
# a quick check to see if any files were given
# if none then its better not to do anything than rename some non-existent
# files!! Thanks to mikkey at dynamo.com.ar
if [ $# -eq 0 ]; then
echo -e "\033[31mNo files given!!"
echo -e "Usage: sub old_string new_string file_name[s]\033[0m"
exit 0
fi
# Perform the operation on all the input files
for file in $*
do
cp $file "$file".bak
sed s/$old_word/$new_word/g "$file" > "$file".1
mv "$file".1 "$file"
done
exit 0
Vim :
Very often you will make the same mistake again and again. Your fingers just don't do what you intended. This can be corrected with abbreviations. A few examples:
:abbr Lunix Linux
:abbr accross across
:abbr hte the
The words will be automatically corrected just after you typed them.
The same mechanism can be used to type a long word with just a few characters. Especially useful for words that you find hard to type, and it avoids that you type them wrong. Examples:
:abbr pn penguin
:abbr MS Mandrake Software
From http://www.moolenaar.net/habits.html
Microsoft Equation Editor hidden shortcuts
Ctrl-l : Subscript
Ctrl-f : Fraction
Ctrl-r : Square Root
Ctrl-I : Intergrate with lower and Upper limits
Ctrl-h : Subscript
Ctrl-j : Both Subscript and Super Script
Presentation on Noise.
(a) What is Noise? (b) Various Noise Sources of Noise in Bulk and SOI FET (c) BSIM Model and Circuit Issues (d) Suppressing Noise in Device and Circuits
This presentation is from a earlier presentation made to the Compact Modeling Group part of the Logic Technology and Development Group at Advanced Micro Devices (AMD), all AMD specific information has been edited out, other references are given on the foils, and readers are encouraged to read these references for more details
Power of sed: is just realized that sed also supports temporary registers.
see this command of example sed -e "s/^\([a-z]\)/+\1/g" file.input
This replaces all the line that begin by an alphabet by a "+" and that alphabet, one shot
Changing lives for ever. Unix tools on Windows!!
For those of you who have sworn aloud when you typed “ls” on the dos prompt and only to see Mr Gate’s $200 software print
'ls' is not recognized as an internal or external command, operable program or batch file.
There is finally hope!!
After spending some time on the web, I found native win32 executables, which would do the same job. I have consolidated multiple zip files from the web and put them in one place. Here is Unix.tgz. Download and unzip the files to a folder called “Unix” in your “C:\Program Files\” directory. Now all you have to do is to add this folder to your windows path. Here is how we do it.
On windows XP.
My Computer --> [rtclick] Properties --> Advanced --> Environment Variables --> In the “System Variables” part, select “Path” and edit it to add
“C:\Program Files\Unix\usr\local\wbin” to the previously existing path separating the previous path and the new path by a “;” (semicolon) So for example my path looks something like this
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Unix\usr\local\wbin
Now click Start --> Run --> “cmd” and in the dos windows type “ls”. And Bingo you have a list of all the files. Try “ls –altr” and watch it work flawlessly too.
You can now use mv, rm , grep, head, tail, gzip, ungzip, sed, touch, which, xrags, diff, find, zip, unzip, cut, split, wc, gawk, more, less and my favorite sed. Besides various other commands.
Disclaimer: I am NOT the author of any of these exe files. The source files were supposed to be kept at http://unxutils.sourceforge.net/ but that link is broken. Also all I have done here is elucidated how to use these files. One of these files could be a malicious worm/virus, again I don’t hold responsibility for that. Usage notes are given on the link above.
Renaming Multiple Files
How many times have you struggled with 500files with the extension 45nm_something and you have to rename all of them to 65nm_something? If the answer is “Numerous” look no further…
Example: you have files
45nm_soi_avt_file1.txt
45nm_soi_avt_file2.txt
45nm_soi_avt_file3.txt
45nm_soi_avt_file4.txt
45nm_soi_avt_file5.txt
45nm_soi_avt_file6.txt
On Linux type
$] rename 45nm_soi 65nm_pd *.txt
To get
65nm_pd_avt_file1.txt
65nm_pd_avt_file2.txt
65nm_pd_avt_file3.txt
65nm_pd_avt_file4.txt
65nm_pd_avt_file5.txt
65nm_pd_avt_file6.txt
Here is the bigger surprise, even Windows XP supports this feature
So in the command window type
C:\> ren 45nm_soi* 65nm_pd*
To do the same thing!!
-mayank
Free GDS Viewer: After searching for a while to find a free and workable GDS viewer for some layout work I hit upon this. This is the GDSII viewer by K. Yuda ver 1.59 and works perfectly.
Great Perl Functions and Libraries:
What do you do if you want the index of an array element in perl? Traversing the array is a dull way of doing a task that can be neatly done as:
# To find the index of "element" in @array
use List::MoreUtils;
$index_element = List::MoreUtils::first_index {$_ eq 'element'} @array;
Also there exists a great awesome statistical library tat can be used to get mean/median/mode/min/max/standard deviation of an array!
# Import this library for Statistical functions
use Statistics::Descriptive;
$wetpar1_stat = Statistics::Descriptive::Full->new();
for () {
$wetpar1_stat->add_data($new_elements);
}
print STDOUT "Mean of Column[$index_wetpar1] :",$wetpar1_stat->mean(),"\n";
print STDOUT "Standard Deviation of Column[$index_wetpar1] :",$wetpar1_stat->standard_deviation(),"\n";
print STDOUT "Median of Column[$index_wetpar1] :",$wetpar1_stat->median(),"\n";
Great Excel Functions
To convert one long column into multiple column of 15 row height each
=INDIRECT(ADDRESS(ROW(A1)+(COLUMN(A1)-1)*15,1))
To convert one long column into multiple rows of 15 column width each
=INDIRECT(ADDRESS((ROW(A1)-1)*15+COLUMN(A1),1))
Data is in Column A
From http://www.cpearson.com/excel/indirect.htm
The real power of the INDIRECT function is that it can turn any string into a reference. This includes any string that you build up using string constants and the values of other cells in the formula, strung together with the & concatenation operator. For example, the simple formula
=SUM(A5:A10)
will sum the values in the range A5:A10. However, suppose you want to be able to specify which range of rows to sum "on the fly", without having to change the formula. The INDIRECT function allows you to do this. Suppose you put your starting row cell B1, and your ending row in C1. Then, you can use the formula
=SUM(INDIRECT("A"&B1&":A"&C1))
mayank gupta (c) 2013