Posted on September 8, 2016, 10:33 pm
In sqlplus connect as sysdba
Flatiron Building |
SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';
ALTER USER {username} IDENTIFIED BY {password};
ALTER USER {username} ACCOUNT UNLOCK;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
SELECT username, account_status FROM dba_users WHERE ACCOUNT_STATUS LIKE '%EXPIRED%';
Read More
Posted on August 9, 2016, 9:37 pm
LINUX : FIND AND DELETE FILE OR DIRECTORY
Syntax
find . -name "WHAT YOU WANT TO FIND" -exec rm -r -f {} \;
find . -name ".settings" -exec rm -r -f {} \;
find . -name ".project" -exec rm -r -f {} \;
find . -name ".classpath" -exec rm -r -f {} \;
find . -name "target" -exec rm -r -f {} \;
find . -name ".git" -exec rm -r -f {} \;
find . -name ".idea" -exec rm -r -f {} \;
find . -name ".gitattributes" -exec rm -r -f {} \;
find . -name ".gitignore" -exec rm -r -f {} \;
WINDOWS : FIND AND KILL PROCESS BY PORT
Syntax
netstat -a -o -n | findstr "LISTENING" | findstr ":XXXX"
taskkill /F /PID
XXXX : port number that you want to find
netstat -a -o -n | findstr "LISTENING" | findstr ":8080"
netstat -a -o -n | findstr "LISTENING" | findstr ":8080"
2252 : port number that i want to kill
Read MorePosted on August 9, 2016, 5:36 pm
As i use WAMPSERVER 2.5 with Symfony 2 and I get this error when i edit vhost file and point it to my virtual host. my httpd-vhosts.conf :
<VirtualHost *:80>
DocumentRoot "C:/wamp/www/repository/rokmeulblog/lib/rokmeul/web/app_dev.php"
ServerName rokmeul.blog
ErrorLog "logs/rokmeul.blog-error.log"
</VirtualHost>
and the error :
No route found for GET app.php |
to get ride of this error, you need to enable the
#LoadModule rewrite_module modules/mod_rewrite.so
Go to httpd.conf file and uncomment...
Read MorePosted on November 16, 2014, 11:09 pm
Bad command
echo $(date "+%Y%m%d")$(($(date "+%H")-1))
Why ? : the output format is only one digit from (0-9) for midnight (00h) you will have (00-1) -> WTF !
Good command
"OK but not the top one :/" and this one cans only decrease
echo $(date "+%Y%m%d")$(date +%H -d "1 hour ago")
Good command
"Yes, this one is perfect :)"
echo $(date "+%Y%m%d%H" -d "1 hour ago")
Get time by increasing or decreasing an hour in Linux command |
/!\with the same command you can decrease by day or year
Ex:
echo $(date "+%Y%m%d%H" -d "1 day ago") echo $(date "+%Y%m%d%H" -d "1 year ago")
echo $(date "+%Y%m%d%H" -d "1 day ago")
echo $(date "+%Y%m%d%H" -d "1 year ago")
Read More
Posted on November 15, 2014, 8:55 pm
AWK (sometimes called nawk) is a Linux programming language designed by Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan.
The name of the language was taken from the three letters of the designer's name (Aho, Weinberger, and W. Kernighan).
Read text file by condition with AWK |
Even the original version of awk was written in 1977 and continue their innovation to this day, but this language is still new for me :p and I found that it is more powerful, more practice and largely used in shell programming.
It is easy to discover another programming language if you've already known one isn't it ?
So now let's start some tutorial with me.