Mentor's blog

Linux: bash script to backup the OS

This is a really simple command/script to backup via rsync an entire Linux OS: #!/bin/bash rsync -aAXv --delete --exclude={"/dev/","/home/","/lost+found/","/media/","/mnt/","/proc/","/run/","/sys/","/tmp/"} / /media/Data_Backup/OS/ Source: wiki.archilinux.com

Android: how to edit or port a rom's apk

To edit an Android apk we have to accede at its content and to do this there are several software that simplify the usafe of Apktool : APK-Multi-Tool AutoAPKTool and if we have to edit the files smail in the odex file, the we can use the tools smali/backsmali . Here there are some standard commands to do smali/backsmali: #decompile java -jar baksmali.jar -o <deodexed_dir> <odex_file...

Script MATLAB to map the S-plane to Z-plane

The points of the s plane are related to the z plane by the function: and below the code of a MATLAB script to map on the z plane the points of the s plane: thetaS=0:pi/8:2*pi; circ=exp(j*thetaS); plot(circ);hold on zz=ones(size(circ))*(.00001+j*0.0001) plot([zz;circ]) axis 'square' % Visualising the complex exponential %&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&...

Windows: download the Debugging Tool as standalone archive

Officially to use the Windows Debugging Tool we have to download the whole Windows SDK and then we have to search it and install it. Fortunately Julien Crozon has extracted, packed and made available Windows Debugging Tool 6.12 as standalone archive, we have only to download it and execute Windbg: Debugging Tools for Windows v6.12 x64 Debugging Tools for Windows v6.12 x86 Source: bugslasher.net

Android: how to extract a System image

Usually to extract an image file of the Android /system partition we can use the simple Android Kitchen but if the System image is signed (System_signed) to extract it we have to use simg2img : #!/sbin/sh # python simg2img.py system_signed tmp.img sudo mount -t ext4 -o loop tmp.img extracted/ Sources: andwise , Hazou

Windows Update stuck on Checking for Updates: solve the problem with WSUS

If on Windows should happen that Windows Update search the updates forever, remaining stuck on "Checking for Updates" the simplest way to solve the problem is using WSUS Offline Update . Browsing the web for this problem a lot of people advise to install some packet or some patch, I tried everything and for me the only solution has been using WSUS Offline Update to search and install the missing...

Windows: manually start VMware

Usually VMware automatically start at boot time, to start and stop it manually we can disable the autostart of the following services: VMware Authorization Service VMware DHCP Service VMware NAT Service VMware USB Arbitration Service and we can use a batch script as the following: @echo off echo Start/Stop VMware Workstation services echo. echo 1. Start echo 2. Stop echo. choice /c:12 If...

Windows: environment variables Java

Usually we define the environment variables for Java in this way: JAVA_HOME-> C:\Program Files\Java\jdkx.x.x_xx Path-> C:\Program Files\Java\jdkx.x.x_xx\bin but the best way to define the environment variables for java is the following: JAVA_HOME-> C:\Program Files\Java\jdkx.x.x_xx Path-> %JAVA_HOME%\bin

Windows: batch to simultaneously uninstall multiple KB updates

In Windows to list the installed updates we can use these commands and to uninstal simultaneously multiple updates we can use the batch suggested here : @echo off for /f %%i in ('type c:\list.txt') do ( echo "Uninstalling KB%%i" wusa /uninstall /kb:%%i /quiet /norestart ) echo "Uninstallations Complete." echo.echo "Rebooting..." echo. shutdown /r In the file list.txt we have to indicate only the...

Boost'cache lifetime ignored in Drupal 7: how to solve the problem

Sometime in Drupal 7 the Boost 's cache is flushed during the cron without respecting the Boost maximum cache lifetime setting, this happens when the cron is running and there is an attempt to re-run it, something goes wrong and the Boos'ts cache is flushed. To solve this problem i made that the Boost's hook_cron is executed for last using the function hook_module_implements_alter : function...

Pages

Subscribe to RSS - Mentor's blog