For a project I was working on, I needed to sync the time on hundreds MacBooks so they would join an Active Directory domain properly. I needed to find a way to script this, but after scouring the internet for solutions and various combinations of ntpdate or ntpd commands, nothing seemed to work with consistency.
With ntpdate, I kept getting errors complaining that the NTP socket is in use. As it turns out, you cannot use ntpdate to sync the network time if you have “Set time and date automatically” enabled in System Preferences. The solution? Disable it, sync the time, and re-enable it. Thankfully, we can do that all from the command line:
# systemsetup -setusingnetworktime off
# ntpdate time.apple.com
# systemsetup -setusingnetworktime on
Allowing Rhino 4 to try to find a Zoo server on its own on a larger network can be quite frustrating if there are firewall restrictions in place or if the server is on a separate network than the clients. Thankfully, you can just specify the NetBIOS name of the server that Rhino looks for in the registry as a string.
Just create a string called zoo4with the NetBIOS name of your Zoo server as the value in one of the following locations:
Rhino 4.0 on Windows 32-bit
Rhino 4.0 on Windows 64-bit
Here’s the situation: you’re “the computer guy” to your family or friends. They just got a new computer and ask you to get it in good working order before they start using it. You power it on to find trials of Norton and Office and 30 other programs that can only be considered bloatware. You’d like to perform a clean installation but keep their license. Here’s how:
If these steps don’t work for you, there is a more detailed guide by the creator of ABR that you can check out. Essentially, you’re just migrating your license files from the old installation to a clean installation on the same computer.
While storing IPv4 addresses as strings as MySQL may seem like the obvious solution, there’s a better one: storing them as long integers. Specifically, you will want to make your IP address field an unsigned bigint.
A friend of mine lets me use his box for almost anything I want and made me a sudoer. Today, I needed to create a MySQL user for myself without knowing any of his passwords. Here’s how I did it:
$ sudo service mysql stop $ sudo mysqld_safe --skip-grant-tables & $ mysql -u root > FLUSH PRIVILEGES; > CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>'; > GRANT ALL PRIVILEGES ON *.* TO '<username>'@'localhost' WITH GRANT OPTION; > exit; $ sudo kill <mysqld-pid> $ sudo service mysql start
List software that requires updates
# yum list updates
Apply software updates
# yum update
List all available packages
# yum list all
List all installed packages
# yum list installed
Search for a package (wildcards acceptable)
# yum list <package>
Install a package
# yum install <package>
Remove a package
# yum remove <package>
Update a package
# yum update <package>