My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label how. Show all posts
Showing posts with label how. Show all posts

Wednesday, May 13, 2020

How to update git password on terminal: Command line utility to reset github password / access credentials

On macOS, you can use

git config --global credential.helper osxkeychain

A username and password prompt will appear on your next Git action (pull, clone, push, etc.).
Eg: If you do git clone: gttps://mfaiz@www.repository.git .

As soon as you press Enter key, you will be prompted for a password.
You can use the updated password here. And, you will be able to access and password also gets updated automatically!


For Windows, it's the same command with a different argument:

git config --global credential.helper wincred


Isn't this simple :)
Cheers.

Thursday, January 24, 2013

CentOS 6.3 - Version/ Network/ GCC/ GDB - Settings

Good that you chose CentOS for your usage. Undoubtedly, it is a good Linux flavor. You may download latest binaries/ iso images etc from http://www.centos.org/


What is CentOS Linux?

It is worthwhile to mention that CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor.  CentOS conforms fully with the upstream vendor's redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.)  CentOS is free.

CentOS is developed by a small but growing team of core developers.  In turn the core developers are supported by an active user community including system administrators, network administrators, enterprise users, managers, core Linux contributors and Linux enthusiasts from around the world.

Above description may also be read in full details at centos.org.


How to check Version of CentOS? 32bit or 64 bit?

if u do uname -a
you will get linux kernel description. for eg.
Linux dnsserver 2.6.xx-yyy x86_64.
it tells you that it is a 64 bit OS

in case you want to read centos version do the following:
cat /etc/centos-release

it will return you something like "CentOS release 6.3 (final)"
Now this typically tells you that it is CentOS 6.3. Voila!!

You can also use cat /etc/redhat-release.

Install Gcc and GDB


This usually comes bundled.
In order to check version you can use --version switch. For eg.
gcc --version
gdb --version

CentOS 6.3 comes with GDB 7.2.xx series.

In case you dont have gcc etc, you can use Yum command.
First check with rpm.
Then use yum command.
For eg.
rpm -q gcc-c++
yum install gcc-c++

Network Settings in CentOS 6.3


Being a UI rich OS, you can directly set network parameters.
Goto System-->Preferences-->Network connections
Choose connection you want to correct (usually eth1 for ethernet)
Go to IpV4 setting and provide Ip address.
Press OK

Then from command shell you can check whether it is set or not. Use the command "ip a"

So, your Development or Testing infrastructure is ready. Use, code, distribute, and test your applications. And thank me too!!

Signing off for now.
Mohd Anwar Jamal Faiz
Toughjamy@yahoo.com

Thursday, April 12, 2012

Friday, January 20, 2012

Software Problems in Filtering and censoring Internet

Post from Internet Censorship Voyager Blog.

I really find it hard to tackle the problem of keyword filtering and removing objectionable contents from the Internet servers as big as yahoo, google, Facebook etc. 


With more than billions of Internet users let’s see what are problems:

1. Billions of Internet users around the globe
2. Thousands of cultural diversities across the globe
3. Millions of line posted every hour over the internet
4. Approximately 11 hours video upload every third minute across the globe
5. Tweets, status updates, messages, forwarding, comes in a real time environment. So who will keep track of these things
6. What is objectionable may not be objectionable for other and vice-versa
7. Age old problems like “Adult content removal” is still not successful, who the hell can develop an “Offensive content removal” system. Hat’s off to law making people. They think programming just like passing a bill in legislature, or just finding a mistake in law that could convict an innocent or help escape a murderer.
8. Google indexes websites by their webbots (crawlers). But now a filtered Indexing has to be done. So now thousands of daily complaints by webmasters will come, why their websites was not crawled.
9. Facebook has to re-invent ways to check status updates. Monitoring (manual efforts and decision making also reuired here) will make your status updates taking time to come. 
10. DNS manipulations and proxy servers are very common these days and known to almost every informed internet user
11. Audio visual contents and text in images are still not possible to handle.
12. Any Language translations API is also not 100% successful till date
13. Bla bla bla
14. Bla bla bla


In addition to these also remember some of my thoughts that I use to share regularly related to Internet Censorship. Combining all facts I find it an extremely baffling problem to deal with.


So do I need to reason out more by logic? You all are better judges. 

Friday, December 16, 2011

How to set WinDbg as your Default Postmortem Debugger

In one of my my earlier post related to Microsoft Useful Apps and Powertoys for Windows, I already talked about WinDbg. WinDbg is a tool for debugging any Crash in a program. This tool automatically syncs up the required pdb files ie. The symols file from the MSDN and enables your machine to debug the problems. Refer http://http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx You can have a dump of your crash and investigate, or contact your administrator. In addition, you can also log a radar (defect/bug) on the Microsoft. (Also See http://en.wikipedia.org/wiki/WinDbg)

This time I m gonna xplain how to set WinDbg as a Default Windows Postmortem Debugger.

Usually Windows system has Dr. Watson as the default debugger. But undoubtedly, Windbg has upper hands.

So what you can do is as follows:
1. Try to Install the latest Windbg Debugging Tools for Windows:
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
2. You can Set WinDbg as a default debugger by issuing the following command:
WinDbg -I
It is very important to note that the letter 'I' must be capitalized.



3. Create some folder where the dump will. Give it full read/write permissions.
4. Open Registry editor (Run->regedit at command line)
Go to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug
It has the following value:
"C:\Program Files\Debugging Tools for Windows\windbg.exe" -p %ld -e %ld -g
Append this with following string:
-c '.dump /o /f C:\DMP\dmp1.dmp; q' -Q -QS -QY -QSY
The new key will have something like this :
"C:\Program Files\Debugging Tools for Windows\windbg.exe" -p %ld -e %ld -g -c '.dump /o /f C:\DMP\dmp1.dmp; q' -Q -QS -QY -QSY
[Lets assume here C:\DMP is the folder u wanna make dump creation folder]
5. Important to note the address of WinDbg, since it may vary depending on or OS being x86 or 64 bit.
6. Now it is set as postmortem debugger. In case of any crash now, windbg will pop-up saying the error is encounterd. Dump is stored in the folder allocated earlier.

You must remember the following:
a) Dump is not appended, so if there is some old dump, then that will be over-written
b) On some OS like Win Server 2k3, Win-XP XP and later, you can use the /ma switch instead of /f to save additional debugging information.

Readers can email me personally, as many regularly do, if they found the article helpful and wanna share how this helped them in their roles. Finding my email address is not at all any deal ;)
Cheers!!!
-Mohd Anwar Jamal Faiz

Friday, July 22, 2011

Stress Testing [What How When]

This post aims to throw light on questions such as, "what is stress testing", "how to do stress testing", "when to do stress testing". So basically, it gives you my visualization of stress testing. Specifically, how i see it and feel of it. In Stress testing you try to break the system under test. Rather you can also call it study of Emotional quotient of your system. How well it behaves when it is subjected to stress. Definitely this means of finding innovative ideas to give the system/process a really really tough time. This can be achieved by expanding its resources or by taking resources away from it. Often in the latter case (but sometimes in both) it is called negative testing. The main purpose behind this testing is to make sure that the system fails and recovers gracefully. So, the keyword here is RECOVERABILTY.

It is to be understood that the performance testing demands a very controlled environment. Since you are going to set baselines and compare against old baselines, you have to be very cautious about the environment, architecture, OS etc. But Stress testing enjoys the beauty of randomness. You may very well doubt on what beauty I am talking about. But seriously, only a Good tester can tell you how much he enjoys in inducing chaos, catches and unpredictability. I felt this pride and fulfillment many times in Adobe and Symantec.



It should be instilled deep that stress testing is not breaking the system purely for the pleasure of breaking it. Rather it allows observation of how the system reacts to failure. It tests recoverability, error messages, breach of security due to unpredictable behavior, hangs etc. For example the simplest you can do is to parallelly run processes that consume resources. This may be CPU, memory, disk, network, database consuming processes. Think about tools and utilities available. For instance read my post related to 'ulimit' tool on linux. [PS: There are thousands of tools. i am just giving an example, because that is also very helpful. And yes, for me you clicking on Advertisements is very helpful.] If no tool is working out you can think of writing you own test application. Simplest is an application with overriden new operator. Look my post on that. Find from references below. Think about doubling the baseline number for concurrent users. What happens if different protocols used to access same system at same time. What happens if the Files being processed are of very large size, or of very small size.

Remember my pictorial representation above. Stress testing means 'giving your application really really tough time. Think about innovative ways to test the Emotional quotient of your system.'

But do remember to come to this test only after your functional and integration testing has been done. If you are only responsible for some module, then you may stress test your module/API/DLL/lib/so (Hmm..anything) once your Acceptance and Unit Testing are finished. Obviously in Agile environment, due to time crunch, Functional testing and stress test can be started in parallel on different systems. Although the former is more important, but unfortunately time is the only thing you go out of often. So stress can be triggered on some machine. And you can analyze results of functional test. And if FT is pass, you can also analyze stress test result. For Antivirus products, you can have a stress file set that contains Zip compression bombs, large files, files having viruses. For Desktop publishing applications, your test set files may contain large application files, fuzzed files, or files not saved properly, or any set of files that are known to give tough times to your system.

References On my Blog:
Ulimit as a tool on Linux for Stress Test
Different types of Software Testing
Overriding new and delete operator for stress testing

Monday, July 11, 2011

Scroll bar in HTML Table using DIV and CSS without Javascript

This one was really really tricky. The internet is full with hundreds of different implementations, i dont know why. There are multiple Javascripts mentioned for this. Cross platform concerns are raised for this. Google Chrome not supports..., and Firefox not supports...I dont know what not are mentioned on the internet. A simple google search saying scrollable table in html also does not helps you out.

You can see instances of same problem replicated at hundreds of places some of which are mentioned below. Check out them before reading below. All are awesome workarounds, but none of them tackles the problem.

1) See long javascript implementation at Click here. But problem not solved.
2) See CSS+Javascript workaround at Click here
3) See a solution at Stackoverflow.com at Click here

As mentioned, all the above implementations are ingenious ones. But i dont know why so much pains have been taken up for a simple problem. this also kept me wandering from one solution to other when I wanted one for my own implementation in the facebook application created by Mohd Anwar Jamal Faiz. [Obviously me ;) ]

You can check out this implementation in live at Facebook Application ICEBREAKER. You can search for this App using your facebook account or may also click here Click for FaceBook App Icebreaker. Or if you want to open The icebreaker app direcly in you Facebook account, you may click here For Icebreaker in Facebook account directly

Obviously man! you have to be logged in your facebook account. In case you are not, it may ask you to login. The screen shot is attached here, where you can see the Table having scroll bars. You may click on the photo to enlarge it. [Also, you must click on a few Advertisements. it wont cost you anything, but will help me posting more valuable stuff without trying to find new means of livelihood. Hahaha ;)]



For all the evangelists and critiques, I have tested this implementation over IE6.0+ to IE 9 , FireFox, Google Chrome, PDAs OS and browsers, Blckberry, MacOSX. So I guess I have done a pretty much stable implementation. Hmmm... I think you are appreciating me. ;)


The solution is utterly butterly simple. The trick was straight but only a few can thing it that ways. The scroll attribute can be easily produced using a div element insite the row or column of the table. Undoubtedly, the div will have its inline CSS. you may obviously govern its property using external CSS, but that is obviously not the question.

For example if you have a table code as follows:

<table id="xyz">

<tbody>

<tr>

<td>

blah blah blah

</td>

</tr>

</tbody>

</table>




You must rewrite it as follows:

<table id="xyz">

<tbody>

<tr>

<td>

<div id="Anwar_jamal_table_div" style="overflow:auto; height:100px;width:200px;">

blah blah blah

</div>

</td>

</tr>

</tbody>

</table>

</blockquote>




You can adjust The height,Width As You like.

Time for me to end this post. Write to me or comment here, if something really messy you want to do and this post does not helps you. in all cases, click on a few of the Advertisements, as that is my bread and butter boss!!
Cheers ;)