Example ldif file

dn: ou=People,dc=example,dc=com
objectClass: organizationalUnit
ou: People

dn: ou=Groups,dc=example,dc=com
objectClass: organizationalUnit
ou: Groups

dn: cn=Artist,ou=Groups,dc=example,dc=com
objectClass: posixGroup
cn: SUBGROUP
gidNumber: 5000

dn: uid=ben,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: ben
sn: Affleck
givenName: Ben
cn: Ben Affleck
displayName: Ben
uidNumber: 10001
gidNumber: 5000
userPassword: benspassword
gecos: Ben Affleck
loginShell: /bin/bash
homeDirectory: USERDIRECTORY1

dn: uid=bob,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: bob
sn: Marley
givenName: Bob
cn: Bob Marley
displayName: Bob
uidNumber: 10002
gidNumber: 5000
userPassword: bobspassword
gecos: Bob Marley
loginShell: /bin/bash
homeDirectory: USERDIRECTORY2

Create a new file base.ldif with the above information.

We need to use…


An opensource project from swri-robotics.

Image for post
Image for post
Photo by Nicolas Peyrol on Unsplash

Nowadays, self-driving car is becoming more and more common. Big company like Tesla is making self-driving car to become realistic. To collect data so that auto car can learn and adapt in real world, we need to handle a lot of bag files.

A bag is a file format in ROS for storing ROS message data. Bags — so named because of their .bag extension — have an important role in ROS, and a variety of tools have been written to allow you to store, process, analyze, and visualize them.

A sample ROS bag file can get from http://realsense-hw-public.s3.amazonaws.com/rs-tests/TestData/stairs.bag.


Image for post
Image for post
Photo by Ari Spada on Unsplash

a Python library for visualization.


Image for post
Image for post
Photo by Kourosh Qaffari on Unsplash

A good book that helps to calm you…


Data Structures

When to use which one for efficiency?

Image for post
Image for post
Photo by Mark Fletcher-Brown on Unsplash

Each data structure has associated costs and benefits. In practice, it is hardly ever
true that one data structure is better than another for use in all situations. If one
data structure or algorithm is superior to another in all respects, the inferior one
will usually have long been forgotten.

Hash table

In computing, a hash table (hash map) is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots


SSH

by edit sshd configuration file.

The configuration for this is in the file $HOME/.ssh/config

Add this to the file

Host *
ServerAliveInterval 100

which will make the client send signal to the ssh server every…


Bash

but works when run directly.

Recently I met an issue that my shell script does not run in crontab. But when I run them directly it works. For example consider this bash:

#!/usr/bin/env bash
aws ec2 stop-instances --instance-ids i-0cebb331ce02934a i-08c55f40aadfa64e i-09aeaec43de5e67e i-09a63f61a682f8d9 i-049cfae6dd25b799

Works perfectly fine when run

./stop-instances.sh

But when add them to the crontab with crontab -e, it does not work

39 14 * * * /home/cuongld/Tools/aws-scripts/stop-instances.sh
45 13 * * * /home/cuongld/Tools/aws-scripts/start-instances.sh

The problem lies in this:

Because the environment when crontab runs, is different when we run them directly.

So what we need to do is try to make the crontab…


Image for post
Image for post
Photo by Nick Linnen on Unsplash

The example will be illustrated with docusaurus.

Donald Le

A passionate automation engineer who strongly believes in “A man can do anything he wants if he puts in the work”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store