I've just set up a new computer (macOS) and when I tried to install cordova it failed. It looked like it was doing somthing for a suspiciouly short time and then it exit whitout any error. It seems the problem was I was trying to install it from an app ...

Click here to read this mailing online.

Your email updates, powered by FeedBlitz

Here is a sample subscription for you. Click here to start your FREE subscription

PatchLog"PatchLog" - 5 new articles

  1. Installing cordova fails
  2. Tevo Little Monster delta grid compensation
  3. Recompile Dovecot with Vpopmail on Debian
  4. grub2 notes
  5. Howto check MySQL replication consistency
  6. More Recent Articles

Installing cordova fails

I've just set up a new computer (macOS) and when I tried to install cordova it failed. It looked like it was doing somthing for a suspiciouly short time and then it exit whitout any error.


It seems the problem was I was trying to install it from an app folder that contained a folder named cordova and although I was running "sudo npm install -g cordova" which is supposed to install it globally it didn't work. All it did was to link my app folder to /usr/local/lib/node_modules . After I removed the link and ran "npm install -g cordova" it installed correctly.

Note to self: next time you install cordova on a new computer make sure you don't do it from a place where there's already a "cordova" folder.


Tevo Little Monster delta grid compensation

Before you start the calibration check if you have the grid calibration enabled in the smoothieware config file:
My config has this:

#Example for the delta grid leveling strategy
leveling-strategy.delta-grid.enable true # Enable grid leveling
leveling-strategy.delta-grid.radius 140 # Grid radius in millimeters
leveling-strategy.delta-grid.size 29 # Grid size, must be an odd number


The bigger the grid size, the more points it will test and the longer will take.

Heat the printbed to the temperature you normally print with.

Do the grid calibration:

; home

;bltouch alarm release
M280 PS10.6

; probe pin down
M280 S3

; set bed temp to 80C
M190 S80

; do delta calibration

; save trim to sdcard

; probe the grid and enable grid compensation

; save the grid to sd card

;To set the zero for the print head
;Make sure there is no left over material on the nozzle ( maybe heat and wipe it )
;go home

;go close to Z=0
G0 Z1

; put a sheet of thin paper under the nozzle
; Then move the head ( using the printer controls ) until it presses on the paper sheet, until ; you feel the friction when you pull on the paper. This is the Z=0 point
; Use this point as the homing offest
M306 Z0

;save to SD card

But even after all this it seems the prints are still not all right, so another option is to do some manual calibration of the hotbed using some springs. 


Recompile Dovecot with Vpopmail on Debian

Here's a script I use to quickly recompile dovecot with vpopmail support on Debian 6.0. I'm using the backports repository to get the 2.1 version of dovecot.


Now I'm using the following script every time I update and I get a new version of the dovecot packages.

  1. #!/bin/bash
  3. BDIR=./dovecot.$(date +%Y-%m-%d_%H-%M-%S)
  5. mkdir $BDIR
  6. cd $BDIR
  8. sudo apt-get source dovecot-core
  9. sudo apt-get build-dep dovecot-core
  10. dpkg-source -x *.dsc
  12. cd $(find ./ -type d |grep dovecot|head -1)
  14. sed -r -e 's/with-sqlite \\/with-sqlite \\\n\t\t--with-vpopmail \\/' debian/rules > debian/rules.mod
  15. cat debian/rules.mod > debian/rules
  17. DEB_BUILD_OPTIONS="--with-vpopmail" fakeroot debian/rules binary
  19. find $BDIR -type f -name "*.deb"|grep -v 'dbg' |xargs dpkg -i

The last line also installs all the dovecot packages except for the debug one. You might want to change it if you don't want all.


grub2 notes

Grub2 configuration is in /etc/defaut/grub ( on Debian at least ).

Set GRUB_DEFAULT=saved in /etc/default/grub if you want to start with the last good boot.

update-grub - detects kernels automatically and writes boot lines to /boot/grub/grub.conf

grub-set-default - set the default entry ( First boot entry is number 0 )

grub-reboot - set the boot entry for the next reboot only ( for testing new kernels or other boot stuff especially when you're working remotely )


Howto check MySQL replication consistency

If you want to be sure the data on the slave is the same as the data on the master ( yes sometimes is can happen to bbe diffeent ) you can use pt-table-checksum ( part of percona-toolkit ) to compute checksums for the data in the tables and then compare the checksums from the master with the ones on the slave(s).

Some options

Use with replication

pt-table-checksum can be used to compare any two databases/tables but if you want to compare everything on master and it's slaves you can use the
--replicate option to connect only on the master and compute checksums. The checksums will then be computed on slaves too by replicating the checksum statements.

Detecting slaves

If you have slave hosts running on non standard ports use option --recursion-method=hosts to tell pt-table-checksum how to detect the slaves. Tell the slaves to report their hostname and and port with report-host and report-port in my.cnf . This will make them show in "show slave hosts" issued on the master.

If the "hosts" method doesn't work, try with --recursion-method=dsn=t=dbname.dsns_table . Create a table with the name "dsns_table" and the following structure in the "dbname" database:

 `dsn` varchar(255) NOT NULL,

And put the dsns for accessing the slaves in the dsn field.

insert into dsns values ('','h=,u=root,P=3306,p=slavepassword');

For non innodb plugin

--lock-wait-time is required if using a version of mysql without innodb plugin.

Database for storing checksums

pt-table-checksum stores the checksums in mysql so you have to create a database where to store the checksums table. I named mine "mk" since the tool was called mk-table-checksum before it became part of percona toolkit.

Use the --create-replicate-table option to create the checksums table if it doesn't already exist.

Example usage

pt-table-checksum --recursion-method=hosts --lock-wait-time=50 --defaults-file=/home/mihai/mysql.pass -u root --create-replicate-table --replicate-check --replicate mk.checksums

Example output

09-13T18:25:13      0      0      361       1       0   0.019 mydb.accounts
09-13T18:25:13      0      0       91       1       0   0.079 mydb.announcements

More Recent Articles

You Might Like

Safely Unsubscribe ArchivesPreferencesContactSubscribePrivacy