#MeToo – Things men should get, but don’t!

Last weekend I was faced with (what I thought) was my first #metoo moment. An incident when a lady says “no” and a guy continues to be inconsiderate and idiotic! Then, when pointed out, instead of apologising, walks away pretending to be offended.

We were at a cottage holiday among friends and family. The details of the incident are not important. Fact is it happened so quickly that almost 15 people didn’t notice it, but it didn’t matter that they didn’t notice. A moment of indiscretion in a public setting, made someone uncomfortable, brought back bad memories. The lady responded like most ladies do, retreated from the common area and went and spent some time with herself. Apparently that wasn’t a hint enough for the guy to get the fact that he had done something discomforting and wrong. It wasn’t obvious to him.

As the evening progressed, when the lady joined the group again, the guy went up to her and ‘innocently’ inquired ‘what happened?’. At this point the lady lost it and gave him a proper telling off ending with ‘… for me this is a #metoo moment!’. At that point, everyone’s ears perked up, everyone heard it, and everyone was suddenly aware something had gone wrong. The reaction of that guy and the other guys in the group was an eye-opener for me. None of them actually got what had preceded before that telling off.

There on, instead of focusing on why was there a need for the outburst, guys in the group were – ‘why bring up #metoo?’, ‘both should apologise to each other!’, ‘he didn’t mean to’ WTAF are you talking here mate! You just sounded like the orange faced cretin, where he said ‘there were fine people on both sides’ after Charlottesville, when a pig of a person mowed down a protestor with a car? Yes, you sound like that, when you say ‘both should apologise’… or ‘why did she say it publicly?’… f***’s sake, it happened publicly, so why should it not be said publicly!

I was stunned that the guys were asking these questions or saying these things. For them apparently #metoo was some ‘high bar for nasty, criminal behaviour’. I spent nearly the entire night trying to explain that it wasn’t the case, there was only one person in the wrong here, and only one person needed to apologise. I think I failed. Sadly! While I went and apologised profusely for the evening ruined, to our friend, the rest of the guys were worried about ‘establishing’ wrong behaviour and dissecting ‘why did she say #metoo?’

But things didn’t stop there, it got worse when, during my attempt to apologise for the incident, one of the ladies said “what happened is statistically true given the size of the group”. At this, two guys threw a hissy fit, as to how is that possible? They completely failed to see, it had already happened! Intentional or not, we were in a room where a woman had complained that she was made to feel physically uncomfortable by one of us. Instead of acknowledging that, they were still trying to agree what had happened actually warranted the use of the term #metoo, ugh!

The next day, when everyone had slept it over, before parting ways, the lady made a supreme effort go up to the guy and ask, “I wasn’t in a mood to listen to you last night, is there anything you wanted to say now?”, instead of apologizing profusely, his response (paraphrased) was ‘let bygones be bygones’!

Guys, I am writing this down in hopes that it will get into your head, maybe not today, someday…

  • Social norms and values are very dynamic and fluid, if you are not tuned to them when in a social setting, you should dial yourself down to a point were you approach things conservatively.
  • If you know and are aware of a social boundary, don’t try to push it in the name of occasion, how much alcohol you’ve had, or who initiated a chain of event.
  • If you realise you’ve crossed a boundary, whether on your own or by direct/indirect prompts, the only thing that will fix it is an unconditional apology at the very first opportunity you get. You may not understand why your seemingly innocuous actions were construed as an invasion of privacy or personal space, it only means you need to try to learn more, sincerely. Don’t try to brush it off with a ‘I didn’t mean it’!
  • The longer you take you apologise, the deeper the hurt gets and more difficult it becomes to treat it as an ‘honest mistake’. Taking 72 hours to talk about it, borders on acknowledgement of guilt, and then making it about yourself during the apology just makes it a non-apology and meaningless.
  • It is not about your intention ‘interpreted wrong’, it is about your actions resulting if someone feeling uncomfortable, due to myriad reasons possible.
  • Don’t feign innocence because no one complained to you before. Being human means being different from others in many many ways. You are not expected to know all the ways, but if someone says you goofed up, then admit it, learn from it, apologise genuinely, and back off.
  • Don’t make it about yourself. Getting accused of improper behaviour may come as a surprise, but it shouldn’t shock you into inaction. Quite the opposite, it should shock you into action. If you are among friends, it gives you an opportunity to course correct, introspect and come out a better person. The moment you make it about yourself because ‘it never happened to you before’ or ‘no one said it to you before’ you have lost it and probably the friendship.

Women should NOT have to cry out a hashtag for you to sit up and listen to her disagreements about personal space. Apart from the criminal behaviour that has brought #metoo to the fore, any of the following can bring back bad memories that are hurtful and hence just as detestable and protest-able

  • Every time you ‘did not hear’ her protest about encroachment of private space, however mild it was. A no is a no is a no!
  • Every time you forced a physical contact that may have been appropriate in another scenario (A hug as a greeting is not the same as hugging/touching when, say you are playing a game that doesn’t actually need such interaction)!
  • Every time you don’t try your hardest, to avoid physical contact in a public place, and don’t apologise for contact that was unavoidable (for example – crowded trains, buses, public transport are not a license to ‘lean in’ or ‘touch’),
  • Every time you threatened her with violence (don’t have to perpetuate, just being vocal is bad enough)
  • Every time you questioned a woman’s complaint about being uncomfortable/sick/nauseous etc. about a certain action, speech or gesture.

If you think getting the above is ‘hard’, imagine what goes through women when one or more of those things happens to them in varying frequencies over their lifetime!

For everyone who recognises what I have written here and still say ‘but…’ I present to you, Captain Jean-Luc Picard.

It was a very sobering few days for me, needing much introspection and how I (and guys in general) go about and how women have go about, socially. Even though I wasn’t the aggravator in this case, I have been around women who have been hurt and have not protested, or not been apologised to, for the hurt… it actually took someone near and dear to yell #metoo for me to understand that it happens far too often even in our closest circles. I guess it wasn’t my first #metoo event after all, just the one I heard clearly! Now pardon me while I go introspect my follies and figure out the apologies I owe!

 

Advertisements
Tagged ,

Setting up PostgreSQL (9.6) on Debian Stretch

I have been trying to setup a home network of connected devices for… lets just say a long time! I have made some progress in recent days and the next step is to start using some sort of backing store to store some values.

While MongoDB works well with the Nodejs stack, it isn’t well supported on Raspbian because Raspbian is 32bit and MongoDB stopped supporting 32 bit fully due to data size restrictions (biggest DB you can have is 2GB). Raspbian Stretch does provide an updated MongoDB but it is still a few (minor versions) short of the shiniest.

However using Jessie Backports I was able to install PostgreSQL 9.6 (the shiniest version). Having installed it, I had no idea what to do next. Here’s my journey to get PostgreSQL to a place where I can start using it.

My dev environment’s base OS is OSX and I run my DB in a VM hosted by VirtualBox. So I have setup a Debian Stretch VM called dev-db before I start with PostgreSQL installation. I am trying to setup a parallel runtime environment on a Raspberry Pi as well so if there are any exceptions to these steps I’ll document them for the Raspbian as well.

Installing on Debian/Raspbian Stretch

Both the distros have the required repositories in the apt list, out of the box, so all you have to do is

sudo apt-get install postgresql-9.6

This will create a PostgreSQL default user called ‘postgres’.

sudo service start postgres

Setting up your User Account

PostgreSQL databases are usually tied to a user. Out of the box, PostgreSQL users are not the same as *nix account users, however, if you a common name between your *nix account and PostgreSQL account things become much easier. So lets assume account I am using to log in to Debian stretch is called ‘dbuser’. It is in the sudoers list and I logged in to the terminal/desktop using it.

First step is to change user from ‘dbuser’ to ‘postgres’ that PostgreSQL created during installation.

sudo -i -u postgres

This is the admin account for postgresql, in a production environment, it is a good idea to protect this with a password at least.

Next step is to tell PostgreSQL, we have a ‘dbuser’ account that we want to be able to use for create databases in PostgreSQL.

postgres@dev-db: ~$ createuser dbuser --pwprompt

It will ask for password, I entered the same password as my *nix account but that may not be a best practice.

Finally create a db for the dbuser

postgres@dev-db: ~$ createdb dbuser

Now log out of the postgres account and go back to dbuser account

postgres@dev-db: ~$ exit
dbuser@dev-db: ~$

Start psql client and you should get logged into the pi database using the PLSQL

dbuser@dev-db: ~$ psql
psql (9.6.4)
Type "help" for help.
pi=>

Enter \q to exit psql.

We have setup PostgreSQL and have established local client access

Enabling remote access

Default PostgreSQL setup enables local client access only. In Dev environment I like to access my VM or PI using a client on my local desktop/laptop. This needs a few additional steps.

Step 1: Open up firewall on VM or Raspberry Pi hosting the DB Server

sudo iptables -A INPUT -s 192.168.0.21 -p tcp --destination-port 5432 -m state --state NEW,ESTABLISHED -j ACCEPT
sudo iptables -A OUTPUT -s 192.168.0.21 -p tcp --destination-port 5432 -m state --state NEW,ESTABLISHED -j ACCEPT

Step 2: Edit PostgreSQL config to allow remote access

Edit the pg_hba.conf file

sudo nano /etc/postgresql/9.6/main/pg_hba.conf

Scroll to the bottom and add the following line

host all all 192.168.0.21/24 trust

Edit the file postgresql.conf

sudo nano /etc/postgresql/9.6/main/postgresql.conf

Find the setting ‘listen_address’ and set its value to the IP address of the VM/Raspberry Pi. This line maybe set commented (starts with #), so uncomment it first.

listen_addresses = '192.168.0.21'

Restart PostgreSQL server

sudo service postgresql restart

You should now be able to access if from a Remote Client.

I use the standard pgAdmin 4 and the connection settings were as follows

Screen Shot 2017-09-10 at 5.48.34 PM

And done!

Up next compiling and setting up Redis on the Pi 🙂

Tagged , , ,

Quickbytes: How to connect to MongoDB in a VM, from OSX (bindIP)

I like to keep my base system clean of databases and web-servers etc. So when I wanted to play around with MongoDB on my laptop instead of cluttering it up, I setup a little Virtual Box VM running Debian 8.5 and got MongoDB 3.2 on it in a jiffy using the official docs.
I then installed my favourite MongoDB client Robomongo and was all set to connect to the DB in the VM itself.
But when I installed Robomongo on OSX it just wouldn’t connect to the VM. I assumed its getting blocked by default OS settings on Debian. So I updated the IP Tables as follows
sudo iptables -A INPUT -s 192.168.0.42 -p tcp –destination-port 27017 -m state –state NEW,ESTABLISHED -j ACCEPT
This enables incoming connections to port 27017, MongoDB default port.
sudo iptables -A OUTPUT -s 192.168.0.42 -p tcp –source-port 27017 -m state –state NEW,ESTABLISHED -j ACCEPT
This enabled outgoing connections.
Replace [192.168.0.42] with IP address of you machine/laptop on which the VM is hosted.
I assumed this would be enough but nope. Robomongo on OSX kept refusing to connect with the error “Network is not reachable”. After running up lots of wrong trees I finally found out that MongoDB forces local IP binding by default as a security measure. This setting is in /etc/mongod.conf
net:
port: 27017
bindIp: 127.0.0.1
I changed the bindIp to [127.0.0.1,192.168.0.42]. Final settings were:
net:
port: 27017
bindIp: [127.0.0.1,192.168.0.42]
Save the conf, restart mongodb service and Bazinga!
Quick vote of thanks to the following articles:
Security Note: Setting bindIP to 0.0.0.0 is the worst move from a security point of view. Do not do it!

How to format a Disk in Debian Jessie

I keep forgetting how to format and label a disk on my Debian system so here’s a quick note to self:
Formatting == Making a File System
Usually adding a new disk means creating a partition first and then making a file system on the partition. I will come back to the creation of partition some other day. For now I just need to format my file system.
We use fdisk to identify partition.
fdisk -l

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8eb2d6f9

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 468553727 468551680 223.4G 83 Linux
/dev/sda2       468555774 488396799  19841026   9.5G  5 Extended
/dev/sda5       468555776 488396799  19841024   9.5G 82 Linux swap / Solaris

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xf8b85d91

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT

Disk /dev/sdc: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9fd1cfdb

Device     Boot Start       End   Sectors   Size Id Type

/dev/sdc1        2048 234441647 234439600 111.8G 83 Linux
As seen above the disks are /dev/sda, /dev/sdb and /dev/sdc Each of them have their own partitions
I want to ‘format’ the /dev/sdc drive, but I already have a partition on it, so I don’t need to create a partition.
To format, I need to unmount the file system first. I did it by right clicking it on Dolphin file system manager and click the Unmount context menu. You can use the umount command as well.
Once unmounted you format it using the following
sudo mkfs.ext4 /dev/sdc1   
The above command give the following output
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdc1 contains a ext3 file system labelled 'WinVM'
        last mounted on /media/sumitkm/WinVM on Sun May 22 16:13:34 2016
Proceed anyway? (y,n) y
Discarding device blocks: done
Creating filesystem with 29304950 4k blocks and 7331840 inodes
Filesystem UUID: 6fdb55c8-95f9-4591-a76e-f5b0ab85a606
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872
                                                                                                                        
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Dolphin will auto mount it but it will use a big GUID as its label. To fix the label use the e2label command
First we check for existing label and it comes back blank
sudo e2label /dev/sdc1
Next, we apply the label WinVM
sudo e2label /dev/sdc1 WinVM
Next, we check the label again and confirm it is WinVM
sudo e2label /dev/sdc1

WinVM
Finally, don’t forget to change owner. Since our mount point was previously defined, it will be picked up automatically as soon as you apply the label. However the ownership is changed to root. Change ownership back to owner yourself using the chown command
chown -R sumitkm /media/sumitkm/WinVM

Where sumitkm is the username and the folder is the mount folder.

Taa daa, you are done!
P.S. This happens to be my first post using my custom built Electron JS based blog editor for Linux and OSX. Check it out at https://github.com/sumitkm/electricedit (A how to article on Electron JS has been in the works for the last 4 months now ;-)… will see the light of the day someday)
Tagged , ,

Setting up a Makibes (Waveshare) 1024×600 touchscreen with your Raspberry Pi Zero

I have been eyeing a touchscreen to go with one Raspberry Pi from my collection (O_o), for a while now. The official Raspberry Pi screen is perpetually out of stock and backordered for months. The resellers are charging a hefty markup.
Only option left was a third-party screen. After a lot of deliberations I settled down on this screen by WaveShare http://www.waveshare.com/wiki/7inch_HDMI_LCD_%28C%29

My criteria were:

  1. Atleast 7 inches (plan to use it as a dashboard at some point)
  2. Capacitive touch (Resistive touch isn’t as responsive, blame iPhones for ruining us ;-)…)
  3. Least number of addon boards to keep things compact
  4. Works with stock Raspbian.

From the looks of it, the WaveShare screen checked all the boxes though the last point is still debatable.

It is available from multiple resellers on Amazon. I bought it via In4dealz and fulfilled my Amazon. They were offering a stand and frame for 6 GBP extra. Total cost 46 GBP. Plus, I bought an Anker Astro E1 external battery pack to power the thing. It’s 5200 mAh and should be able to power the Pi for a while.

WP_20160103_15_55_04_Pro

Here are the unboxing images:

As you can see they come in a neat bundle, well packed but devoid of any instructions what-so-ever. Even for the frame and stand you have to use your ‘imagination’ to put things together which isn’t too bad for the tinkerer in you.

Setting it up to work with the Raspberry Pi Zero

The sequence I am writing here isn’t the same in which I got things working, but things got really simple after I RTFM 😉

Anyway I will not repeat the mistakes here.

Before you start off make sure you have the latest Raspbian Jessie image setup and running for your Pi Zero.

  1. Assuming your Pi Zero is connected to a regular monitor and able to access the internet. Navigate to http://www.waveshare.com/wiki/7inch_HDMI_LCD_%28C%29
  2. The Drivers you need are at the bottom of the page (section 5.6) or http://www.waveshare.com/wiki/7inch_HDMI_LCD_%28C%29#Drivers_for_Raspberry_Pi
  3. If you are setting up the Pi Zero get the B/B+ drivers for version 4.1.13x. Its about 20 MB download.
  4. Once it finishes extract the tar file
    1. sudo tar zxvf filename
  5. Before you run the executable make sure max_usb_current=1 is setup in the /boot/config.txt file.
    1. sudo nano /boot/config.txt
    2. Scroll to the settings and either uncomment the max_usb_current line or add it in a new line at the end of the file.
    3. Exit nano (Ctrl +x)
  6. Now change into the extracted folder (big massive name starting with RPIB+.).
  7. Execute the installer
    1. sudo ./USB_TOUCH_CAP_7.0_RASPBIAN
  8. It takes about 20-30 seconds and reboots automatically.
  9. Let it reboot.
  10. Shut it down. If your regular monitor freezes on reboot, hot unplug the power
  11. Connect the Pi Zero’s HDMI out to the LCDs HDMI in using the Pi Zero’s adapter and the provided flat HDMI cable.
  12. Connect the Pi’s Micro USB to the LCDs Micro USB connector via the provided adapter + cable.
  13. Power up and you are good to go :-)!
  14. If you have an older Raspberry Pi running a version of Raspbian Wheezy, then get the version 3.x drivers. The screen works with them too.
  15. You can install a software keyboard called matchbox-keyboard using apt-get, but I have doubts about it because it seems to consume a lot of CPU resources and even after you have closed it doesn’t release resource (quickly). I haven’t used it a lot though, so I’ll give it another go later.

Assembling the frame/stand

If you bought the additional frame/stand you can assemble it as shown in the slideshow below. The Pi Zero does fit horizontally towards the top of the frame!

And that’s it, you are all set.

I powered it using the Anker Astro E1 battery pack. You can do something similar to keep it portable.

I ever get to making this into a portable/carryable ‘tablet’ I shall post updates here :-).

EDIT: As suspected the ‘drivers’ provided by the vendor don’t work once you update your Raspberry Pi image. I had found a PHP driver that worked initially, but with the latest update of Raspbian that’s broken as well. As of now it is a non-touch screen till I am able to tinker with the PHP driver and get it back online.

However, to get it working with any stock Raspbian as a screen, all you have to do is add the following lines at the bottom of your config.txt.

After you have burned the image to an SD card you can simply add the following lines in the config.txt before you put it in the Pi. This way you don’t need a separate monitor to get going.

max_usb_current=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 1024 600 60 6 0 0

 

 

 

Tagged , , , , ,
%d bloggers like this: