Skip to main content

Posts

Display switcher for terminal buffs

I am not a Linux developer or anything, I just love writing scripts that facilitate in making me lazy. So here's one that lets me switch my displays (dual). I usually work on only one and when I need to quickly switch, I use this. It depends on xrandr though. And it has my display names hardcoded (lots of assumptions, I know), but it might just come in handy.
Switch to left or right
./reset_display.sh left./reset_display.sh right Set both on with duplicate view ./reset_display.sh Set both on their individual view ./reset_display.sh both
You can simlink it /usr/local/bin too.
Github gist
Recent posts

Getting file list from torrent magnet URLs using Aria2

So, I hit upon this realy awesome SO reply on how to fetch the torrent file list using magnet URLs. I use Aria2 for torrents and it's be design that you cannot get any meta data from Magnet URLs because they do not hold any information off the link. They fetch the meta data when you use them. So, what you have to do is, generate a torrent file from them and then use THAT torrent file for listing. So it's a 2 step process.

First you create the torrent file using:
aria2c --bt-metadata-only=true --bt-save-metadata=true -q "magnet url here" It will generate a torrent file right there with a name that is a hash just use that to get the file list.

Credits: http://unix.stackexchange.com/a/134286/52595

Replacing Apache in your VPS with Nginx

If you have not been following the web development scene recently, you need to know that Apache is being seriously challenged by Nginx in the ideal server candidate position. Nginx is a great server daemon that also uses much less resources. Recently I attempted to make a move to Nginx from Apache. But there were some issues that needed to be addressed.

Well, setting up Nginx is really straightforward, just run # apt-get install nginx But you might face problems with starting the nginx service. Well, the most likely reason probably is that by default Nginx is configured to run on Port 80. In computers one port cannot be used by multiple programs at the same time. But Apache too is configured to listen on port 80. Now, if you want to move to Nginx and serve all your sites via Nginx, you can unassign Apache from port and give Nginx the instruction to listen to port 80. To do that you will need to tweak an apache configuration file. This may be different for different distros and scenar…

Wordpress to survive the most difficult hurdle

A legend in the making. Wordpress, as popular as it is among content writers, it is also one of the most cubersome platforms to deploy on. And when it comes to merging more than one wordpress sites, the biggest hurdle is the Database. Well, VersionPress is coming to the rescue.

What VersionPress (VP) attempts to do is make the whole Wordpress installation version controllable. Now, it's one thing when you are merging files but it's completely different monster when you want to take on the Database. Sure, merging 2 DB dumps cannot be an issue for git but what about context?

Imagine this scenario where you have developers making your site look and work awesome and content writers writing away on live production server. Now the day comes when you have to pull the changes from the development version to the production. Well several things get intertwined here
Posts having same IDsPlugins having custom tablesOptions and Meta Now that's a real spaghetti you got there. When you t…

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

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

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.