linux
how to speed up social network badge loading
Submitted by momeunier on Wed, 12/14/2011 - 20:53I have had some problem with my Tripit badge on the left of the screen. For some strange reason it wouldn't load on my Google Chrome. It would load if I would open this page with Firefox or IE though. The weirdest thing is that after loading it from Firefox or IE, I could then load it with Chrome.
So I decided I would take a different approach and cache the badge somewhere.
Here is how to do it:
First get the URL of the javascript file of your badge.
Here is the code of my badge:
- momeunier's blog
- Add new comment
- Read more
- 238 reads



bypass authentication for a specific URL with squid and webmin
Submitted by momeunier on Wed, 08/03/2011 - 15:19If you need to setup some webmin rule for bypassing authentication for a specific URL, it's VERY easy to setup.
This is something that can be needed if you have a windows server behind a proxy and that server needs direct access to the internet in order to be activated:
Activation fails when you try to activate Windows 2008 over the Internet...
- momeunier's blog
- Add new comment
- Read more
- 349 reads



How to find which SQL is executed by a process
Submitted by momeunier on Tue, 08/02/2011 - 12:42If you are looking for the last SQL query ran by a specific process, try this:
select substr(sa.sql_text,1,1000) txt from v$process p, v$session s, v$sqlarea sa where p.addr=s.paddr and s.username is not null and s.sql_address=sa.address(+) and s.sql_hash_value=sa.hash_value(+) and spid=&SPID;
- momeunier's blog
- Add new comment
- 425 reads



How to delete empty line with vi
Submitted by momeunier on Thu, 07/14/2011 - 09:29How to delete empty lines with vi?
Just type this in:
<esc>:g/^$/d
NOTE: This means that all the lines that just have a carriage return on them (NO Spaces), will be removed.
If you want to remove lines with empty spaces as well:
<esc>:g/^ *$/d
- momeunier's blog
- Add new comment
- 138 reads



rename and shorten many files with bash
Submitted by momeunier on Thu, 07/14/2011 - 09:08Bash supports a surprising number of string manipulation functions.
For example if you want to get rid of the beginning of the name of a file or a folder on many files at a time you could do the following:
bash> ls
mylongfile1
mylongfile2
mylongfile3
mylongfile4
mylongfile5
mylongfile6
mylongfile7
bash> for i in *
> do
> mv $i ${i:6}
> done
bash> ls
file1
file2
file3
file4
file5
file6
file7- momeunier's blog
- Add new comment
- 132 reads



Change permanently the ethernet parameters of interface in redhat
Submitted by momeunier on Thu, 12/16/2010 - 01:19In the file:
/etc/sysconfig/network-scripts/ifcfg-eth0
Add the following at the end of the file:
ETHTOOL_OPTS="speed 100 duplex full autoneg off"
- momeunier's blog
- Add new comment
- 204 reads



