Skip to main content

Posts

Showing posts from 2018

VIO Server Howto

1. Run IOS commands as root According to IBM you should never work as root on VIO servers. However, if you login as user padmin and type oem_setup_env you get the root credentials (without even been asked for a password). By default the ioscli commands are not available for the root user. All ioscli commands are in fact calls of /usr/ios/cli/ioscli with the command as argument. You see this if you list the aliases of the padmin user. Knowing this you can use all ioscli commands as user root by appending /usr/ios/cli/ioscli . Instead of » lsmap -all « you would type root@vios# /usr/ios/cli/ioscli lsmap -all If you set an alias alias i=/usr/ios/cli/ioscli you could even type root@vios# i lsmap -all 2. What is the AIX command behind an ioscli command? If you want to know what AIX command is behind the command you issued as user padmin you can use a special debug mode: $ export CLI_DEBUG=33 That's the output of the lsnports   command in this mode: ...

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python. ## In General ### Values - "Build tools for others that you want to be built for you." - Kenneth Reitz - "Simplicity is alway better than functionality." - Pieter Hintjens - "Fit the 90% use-case. Ignore the nay sayers." - Kenneth Reitz - "Beautiful is better than ugly." - [PEP 20][] - Build for open source (even for closed source projects). ### General Development Guidelines - "Explicit is better than implicit" - [PEP 20][] - "Readability counts." - [PEP 20][] - "Anybody can fix anything." - [Khan Academy Development Docs][] - Fix each [broken window](http://www.artima.com/intv/fixit2.html) (bad design, wrong decision, or poor code) *as soon as it is discovered*. - "Now is better than never." - [PEP 20][] - Test ruthlessly. Write docs for new features. - Even more important that Test-Driven Development--*Human-Driven Develo...

Understanding calls to action

Get inside your customer’s head: A guide to writing irresistible calls to action Often, when we think of optimizing our call to action (CTA), we immediately think of landing page buttons and tweaking colors. However, your landing page CTA isn’t the only marketing CTA that matters. To get people to your landing page, you need them to click on your ads, which means you need a smart call to action in your ads. This is particularly important for paid search advertisers in situations where you can’t include imagery to convince people to use your business. To get online searchers to act, you are completely dependent on your paid search copy, including that all-important CTA. But how do you create the right text ad CTA? Should you go with an old standby like “Click Here!,” “Buy Now!” or “Sign Up Today!” or something more specific, like “Get Your Free Consultation Today!”? The answer is… it depends. As with any online marketing campaign, picking the right paid search CTA is all ...

25 powershell command

1. Navigate the Windows Registry like the file system: cd hkcu: 2. Search recursively for a certain string within files: dir –r | select string "searchforthis" 3. Find the five processes using the most memory: ps | sort –p ws | select –last 5 4. Cycle a service (stop, and then restart it) like DHCP: Restart-Service DHCP 5. List all items within a folder: Get-ChildItem – Force 6. Recurse over a series of directories or folders: Get-ChildItem –Force c:\directory –Recurse 7. Remove all files within a directory without being prompted for each: Remove-Item C:\tobedeleted –Recurse 8. Restart the current computer: (Get-WmiObject -Class Win32_OperatingSystem -ComputerName .).Win32Shutdown(2) Collecting information 9. Get information about the make and model of a computer: Get-WmiObject -Class Win32_ComputerSystem 10. Get information about the BIOS of the current computer: Get-WmiObject -Class Win32_BIOS -ComputerName . 11. List ins...