If your cron job is not running as expected check the following: – permission for this file should be 600 – one one can read except root – check the syntax – you need to provide the user that the job should run with ( this is different with crontab -e where it will use the current user) – sometimes your file may have some special characters such as ^M, you don’t see them in normal editor , you can run this command : cat -v /etc/cron.d/your_cron_job file – Make sure that cron service is running:  ps -aux | grep cron – check the logRead More →

If your Mac is stuck with High Sierra , you can’t upgrade it and you want to install iMovie ? follow the steps below: Installing iMovie9 # 1. Download the iMovie 9.0.9 update package curl ‘https://updates.cdn-apple.com/2019/cert/041-98154-20191017-1fbef983-8d87-49af-83b1-edecc007ce2e/iMovie9.0.9Update.dmg’ -o ~/Downloads/iMovie9.0.9Update.dmg # 2. Mount the dmg open ~/Downloads/iMovie9.0.9Update.dmg # 3. Expand (unarchive) the pkg pkgutil –expand /Volumes/iMovie\ 9.0.9/iMovie9.0.9Update.pkg ~/Downloads/iMovie/ # 4. Rename `Payload` to `Payload.zip` mv ~/Downloads/iMovie/iMovie9.0.9Update.pkg/Payload ~/Downloads/iMovie/iMovie9.0.9Update.pkg/Payload.zip # 5. Unpack `Payload.zip` (it will get named `Payload 2`) open ~/Downloads/iMovie/iMovie9.0.9Update.pkg/Payload.zip # 6. Move `iMovie.app` to the `Applications` folder mv ~/Downloads/iMovie/iMovie9.0.9Update.pkg/Payload\ 2/Applications/iMovie.app /Applications/iMovie\ 9.0.9.app # Enjoy! open /Applications/iMovie\ 9.0.9.app If you want to upgrade to iMovie 10, follow theRead More →

Your queries might return more fields than you need in your table, even though you don’t want to show it in the table but you actually need it. For example, the result should return an url , you don’t want to display the url, you want people click on another field but that click should link to your url. So that’s why you need to hide some column. It’s pretty simple, on the Edit Panel , on the left , next to the Query , there is “Transform” tab , click on it , then select “Organize fields” , there will be an option forRead More →

I have spent my entire day to troubleshoot the issue with my Python script. I have a python script using smbclient to open a share file in windows using this library – https://pypi.org/project/smbprotocol/ Everything seems working well, i have tested a couple of servers and they worked perfectly. So i move the script to production , one of my client use it and she reported that that there was an error. I tried on my dev machine, i have the same issue – the only difference is that the server is different. So my script only works with some servers. I spent hours and hoursRead More →

I just got a free PS3 from Marketplace. The owner said it’s not in working condition. I brought it home and tried to see what’s wrong with it. The PS3 powered on, everything looks normal, internet is good. I started to play a game, the screen just went black and i had to hard rebooted it. I did try many games , they all went to black. Again, i googled and they suggest me to go to recovery mode to rebuild database, filesystem, even restore the whole system, it didn’t help. I know PS3 can be jailbreak , so i watched some video how toRead More →

Whenever you run: smokeinfo /etc/smokeping/config , smokeping will load a lot of all configurations into memory, this takes a lot of time. Since we don’t change our configuration often, so why don’t we cache the configuration to a file and smokeping will just load it from a file. The script below is a modified version, it save about 3s loading time – i have about 7000 hosts to monitor , 3s is not a bad number. There are other things we can save time. package Smokeping::Info; use warnings; use strict; use RRDs; use Smokeping; use Carp; use Data::Dumper; sub new { my $this = shift;Read More →

I connect my 27inch Apple LED Cinema display to my iMac 2011 – somehow i can’t control the brightness on my 2nd monitor. There is no option for me to control the brightness on the 2nd monitor, the brightness only appears in the primary monitor. How did i fix it? I download a tool to reset the 2nd monitor http://download.info.apple.com/Apple_Hardware_Test/EDID_Reset_Tool.dmg After you run the tool, power cycle your 2nd monitor, then you will see it brightness control option. Hope it helps.Read More →

I need to share some data between PHP and Python in a secure way, this is what i found on the internet, a library to encrypt/decrypt data working both in Python and PHP. The passshare is a 32 bytes hexa – you can randomly create it by using this command: openssl rand -hex 32 In PHP: function my_encrypt($data, $passphrase) { $secret_key = hex2bin($passphrase); $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(‘aes-256-cbc’)); $encrypted_64 = openssl_encrypt($data, ‘aes-256-cbc’, $secret_key, 0, $iv); $iv_64 = base64_encode($iv); $json = new stdClass(); $json->iv = $iv_64; $json->data = $encrypted_64; return base64_encode(json_encode($json)); } function my_decrypt($data, $passphrase) { $secret_key = hex2bin($passphrase); $json = json_decode(base64_decode($data)); $iv = base64_decode($json->{‘iv’}); $encrypted_64 = $json->{‘data’};Read More →