Skip to main content

Posts

Sony Playstation 3 unboxing video

https://www.youtube.com/watch?v=JMFb3tbId2A Part II coming soon...

OpenStack Keystone Issue with Update of User’s Password – Havana

OpenStack Keystone Update User’s Password – Havana Thanks to this source which helped me out with Openstack keystone documentation issue. Source:  http://blog.autodevbot.com/2014/04/15/openstack-keystone-update-users-password-havana/comment-page-1/#comment-59 It took me a while to figure out how to update a user’s password via the API in Keystone.  All of the documentation seems to be incorrect.  I finally had to take a packet trace of the keystone CLI performing a password update and looking at that before I got the correct API endpoint and what to send to the server.  It turns out to be a PUT request and not like most of their documentation saying it is is a POST request.  Which would make sense since PUT is for updating. Here is the cURL command: curl -X PUT \ -H “X-Auth-Token: ” \ -H “Content-type: application/json” \ -d ‘{“user”: {“password”: “new_password”, “id”: “ “}}’\ http://localhost:35357/v2.0/users/ /OS-KSADM/password

What is the optimum way to find the middle node in a single linked list using C?

What is the optimum way to find the middle node in a single linked list using C? There are two ways Method 1 1- Iterate through the link list to find the number of nodes in it (say n) 2- Start from the root of the list and travel as far as n/2 The other method is a bit tricky Method 2 1- Start with two pointers both pointing to root 2- Now make one traverse the link list one node at a time 3- Make the other traverse the link list 2 nodes at a time At the time, the 2nd pointer reaches the end, the 1st pointer would only have reached the mid The 1st method is optimized for memory and the 2nd one for concurrent traversal and speed

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the newbies of Linux. 1. Found out i had to set the date like this:    # date -s 2007.04.08-22:46+0000 2. Mounting     sudo mount -t cifs // < pingable_host_or_ip > / < win_share_name > /build -o user= ,domain= ,uid=string,gid=string 3. To install linux packages from internet (ubuntu only)     apt-get install 4. To determine what ports the machine is currently listening on     netstat -an | grep -i listen | less 5. Find in files in Linux     find . | xargs grep 'string' -sl 6. To become superuser/root     sudo -i 7. To find a running process using name ps -aef | grep "searchstring" 8. Alt + F2 opens run window in RHEL 9. To access windows share from linux smb:// /d$ 10. To know the last reboot date & time $ last reboot | head -1 11. To install RPM packages in RHEL rpm -ivh 12. To un-install RPM package in ...