Compile perl in Windows
Q. How do I compile my perl script under Windows?
A. The simplest thing is to download and install Strawberry Perl (it is free).
Once installed, get run the following:
perl -MCPAN -e "install PAR::Packer"
and install Packer. Once installed, you can compile a simple script into one big exe file:
pp -o ProgramName.exe MyPerlScript.pl
Timezone setup for Ubuntu 14 and up
There's a new way of setting up the timezone in Ubuntu -- no more cat.
First, find your timezone by running this command:
timedatectl list-timezones
We are in Eastern Time, so we picked America/New_York. Then we run this command to set the timezone:
timedatectl set-timezone America/New_York
Check to make sure the timezone has been set:
Split a large file in Linux
Q. I am trying to move a large file, but I want to split it into chunks.
A. This can be done in using by piping the file into a split command (this also gzips the file):
Split
gzip -c largefile | split -b 512MiB - largefile_split.gz_
This will create a bunch of files:
largefile_split.gz_aa
largefile_split.gz_ab
largefile_split.gz_ac
etc...
Combine
Combining the file on the other side:
cat largefile_split.gz_* | gunzip -c > largefile
Windows 2008 R2 RDS: Log Off a User from a Session
If you are an administrator, you can log off a user from a session (for example, if the user has an session has crashed) in Remote Desktop Services Manager by using the Log Off action.
Follow these steps to log the user off:
-
In Remote Desktop Services Manager, on the left pane, click the Remote Desktop Session Host server on which the user session is running.
-
On the Users tab, right-click the user that you want to log off, and then click Log Off.
-
Click OK to log off the user from the session.
Ubuntu server: change timezone
Q. How do I update the timezone on an Ubuntu Server?
A. Two easy steps:
NB: This will overwrite whatever you've had there before:
~# sudo echo "America/New_York" > /etc/timezone
~# sudo dpkg-reconfigure --frontend noninteractive tzdata
Firefox: Error code: ssl_error_weak_server_ephemeral_dh_key
Starting with Firefox v39 you will receive the following errors when accessing secure websites with a weak ephemeral Diffie-Hellman key:
An error occurred during a connection to helios.alt-itc.ca:8443. SSL received a weak ephemeral Diffie-Hellman key in Server Key Exchange handshake message. (Error code: ssl_error_weak_server_ephemeral_dh_key)
How to resolve this:
1) Ask the webmaster to correct this on the server side (if you have such an option).
2) Perform the following:
i) In the address field of Firefox, type in:
about:config
ii) Click "I'll be careful, I promise"
iii) Find the following keys (type this into the search field):
security.ssl3.dhe_rsa_aes_128_sha
Click on "true" under "Value" to make it "false"
Find the next key:
security.ssl3.dhe_rsa_aes_256_sha
Click on "true" under "Value" to make it "false"
Find serial number in Linux
Q. I'm looking for a serial number of the system and motherboard (eg. Dell or HP), is there any way to find that remotely?
A. Yes, there is. In many cases a little tool called dmidecode can be used.
Here's the synopsis from the man pages:
dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.
More Articles...
Page 3 of 21
<< Start < Prev 1 2 3 4 5 6 Next > End >>