How to Fix an Oracle User's Password When It Has Expired

Posted on September 8, 2016, 10:33 pm


In sqlplus connect as sysdba


Select from dba_users

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

Find and delete file or directory on Linux. Find and kill process by port on Windows

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 {} \;

ex:

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

ex:

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 More

Symfony 2-No route found for GET app.php

Posted 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
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 More

Get time by increasing or decreasing an hour in Linux command

Posted on November 16, 2014, 11:09 pm


Some linux commands tips and tricks (get time by increasing/decreasing an hour in Linux command)

How to get time by -/+ an hour in Linux command ?

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
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

Read text file by condition with AWK

Posted on November 15, 2014, 8:55 pm


What is AWK ?

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
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.

Read More

Blog Archive

  • 2023-May (1)
  • 2023-February (1)
  • 2020-October (1)
  • 2020-May (1)
  • 2020-February (2)
  • 2019-December (5)
  • 2019-November (1)
  • 2018-July (1)
  • 2017-December (1)
  • 2017-November (1)
  • 2017-June (1)
  • 2016-September (5)
  • 2016-August (3)
  • 2016-June (1)
  • 2015-September (1)
  • 2015-May (1)
  • 2015-February (2)
  • 2014-December (1)
  • 2014-November (2)
  • 2014-September (3)
  • 2014-August (1)
  • 2014-June (1)
  • 2014-May (1)
  • 2014-March (1)
  • 2013-December (2)
  • 2013-October (2)
  • 2013-July (1)
  • 2013-June (3)
  • 2013-May (4)
  • 2013-March (1)
  • 2012-December (2)
  • 2012-November (1)
  • 2012-October (1)
  • 2012-September (2)
  • 2012-August (2)
  • 2012-July (2)
  • 2012-June (1)
  • 2012-May (2)
  • 2012-March (2)
  • 2012-February (2)
  • 2012-January (5)
  • 2011-December (2)
  • 2011-November (4)
  • 2011-October (5)
  • 2011-September (2)
  • 2011-August (1)
  • 2011-June (2)
  • 2011-May (1)
  • 2011-April (9)
  • 2011-March (3)
  • 2011-February (12)
  • 2011-January (16)
  • 2010-December (17)
  • 2010-November (6)
  • 2010-October (10)
  • 2010-September (8)