Tuesday, September 27, 2016

Cracking guide

I recently found this guide somewhere on the internet and thought it was an interesting read. Just storing for reference.

https://docs.google.com/document/d/1qRdWYx25yyteX8DQF_LIciT5VZ1_1RnT2ar7w5YP_40/edit?usp=sharing

Saturday, August 06, 2016

Solving GPU nvidia Optimus issues on Linux

I have gone through painstakingly complex processes to solve this issue time after time and today I just decided to record my approach for this time. I understand that one approach almost never works twice for this issue in particular. So I am just going to add links and references that help me solve this problem.


First of all, my approach is based on Bumblebee and nothing beats this when it comes to Arch or Arch based.
https://wiki.archlinux.org/index.php/bumblebee
Then to solve any optimus related issue, https://github.com/Bumblebee-Project/Bumblebee/wiki/Troubleshooting
And finally for primus run
https://wiki.archlinux.org/index.php/bumblebee#Primusrun

Wednesday, July 06, 2016

Fixing assets broken by Google reCaptcha

Well this does not fix the page fully but it make it workable. Follow the steps.
Open fiverr.com, and click "inspect element". Go to "Console".
Then click on an asset (js/css) that has 403.
Now right click on it and click "open in new tab"
Enter the reCaptcha, you'll see the asset file now
Now repeat this for the assets that got 403
Now you got your page partially fixed, you might find some more JS missing, just go to console and fix that using the same way.

Tuesday, July 14, 2015

Connecting via Remote host using postgresql

When the instance of postgres is inside vm and you are on the host machine with some stack such as Node, the scenario becomes as if connecting from a remote host. To make it possible, we have to make postgres listen to remote (all) hosts and also specify the IP of that host.
1. To add the ip to the allowed host list, edit /etc/postgresql/9.1/main/pg_hba.conf and add the lines
host all all 192.168.0.1/24 md5
where 192.168.0.1 is the IP of the host you want to connect from.
2. And to enable listening from remote hosts, edit the file /etc/postgresql/9.1/main/postgresql.conf and add the following line
listen_addresses = '*'
Credits http://www.thegeekstuff.com/2014/02/enable-remote-postgresql-connection/

Setting up Node with NVM

I always keep facing problems with Node. It just keeps pushing me around with it's numerous errors. So, lately I found out about NVM and tried it. Still had an issue with it. But finally got it up and running. Here are some important things to keep note of when attempting to install node using NVM.
1. The default installation directory of the NVM installer (provided in the repo readme) is ~/.nvm. I find this a bit problematic so I actually just clone the repo into /opt/nvm since I kind of stick to sudoing things when they need to be global for node and ~/.nvm isn't owned by root, I kind of like to keep it that way.
2. Now setting up the envvars is done using profile.d/nvm.sh. This could also be done using ~/.zshrc or ~/.zprofile but I like it this way. In whatever case the envvar setup script is like this
export NVM_DIR=/usr/local/nvm
source /opt/nvm/nvm.sh

export NPM_CONFIG_PREFIX=/usr/local/node
export PATH="/usr/local/node/bin:$PATH"
3. So it's basically done (setting up NVM, not node) but since to install anything via nvm I'll need sudo so I must (at least) source the /etc/profile.d/nvm.sh into root. So I just do
$ sudo su
# source /etc/profile.d/nvm.sh
4. Now for the installation of a node version
# nvm install 0.12
# nvm ls
The last one should be done from root because it creates a particular directory that $ can't create.
5. Now we can simply execute
$ nvm use 0.12

Credits:
http://stackoverflow.com/questions/11542846/nvm-node-js-recommended-install-for-all-users
https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps
Found a nice article here: http://www.liquidweb.com/kb/how-to-install-node-js-via-nvm-node-version-manager-on-ubuntu-14-04-lts/

Connect Rapoo MT750S with Linux (Tested on Manjaro)

 I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...