I stumbled upon this post. It is a handy guide to detect almost all feature detection in your browsers.
Check once.
Sade Olutola

JBB: An Artblog!
Game of Thrones Daily

if i look back, i am lost

Janaina Medeiros
No title available

oozey mess
"I'm Dorothy Gale from Kansas"
macklin celebrini has autism
Not today Justin
Cosimo Galluzzi

Discoholic 🪩
todays bird

tannertan36
styofa doing anything
we're not kids anymore.
Claire Keane
Sweet Seals For You, Always
d e v o n
NASA
seen from China
seen from Colombia
seen from Malaysia

seen from Belgium
seen from Brazil

seen from Türkiye

seen from United States
seen from United Kingdom
seen from Mexico
seen from Mexico
seen from United States

seen from United States
seen from United States
seen from France

seen from United States
seen from United States

seen from United States
seen from United States

seen from United States
seen from United States
@raveebhat-blog
I stumbled upon this post. It is a handy guide to detect almost all feature detection in your browsers.
Check once.
Writing unit tests for JavaScript projects
I am exploring unit testing frameworks and test runners to find a perfect combinations to write some unit tests for new features I am developing for an existing complex project. Will come back when I have more information.
Resolving npm error in Windows post installation
You may have seen this error in your Windows after you install Nodejs and try to run npm command.
Error: ENOENT, stat 'C:\Users\ <username>\AppData\Roaming\npm'
This can be resolved easily.
When you go to this path 'C:\Users\ <username>\AppData\Roaming\', you see that npm directory doesn't exist.
Just create a new directory 'npm' under this path 'C:\Users\ <username>\AppData\Roaming\'.
Now run npm.
Problem solved!
Changing default root ditectory in Apache Web Server and avoiding 403 permission denied error
Most of the web servers are powered by Apache. When you are doing development in your machine you may wish to change the default root directory of you Apache web server.
When you install Apache, by default root directory will be most likely /var/www. But you might want to change this location to a secondary partition on your hard disk. Say a localtion /home/username/webroot.
Follow the steps given here:
Locate your httpd.conf, open it in write mode.
Find line with text something like this
DocumentRoot "/var/www".
Change it to
DocumentRoot "/home/username/webroot"
Similarly locate for
<Directory /home/username/webroot> .................. <Directory>
Comment everything else inside these 2 lines. Only thing you need is this line:
Require all granted
Done
Now start the apache server and try to load index.html which is located in your web root(it can be any .html file) by typing this in your browser
localhost/index.html
Note:
If you get an error saying "You do not have the permission to access this folder", it may be caused by this.
Users' home directories are assigned 700 (drwx------) permissions by default. Therefore, the web server, which is running under "http", is unable to access your home directory. Change your home folder's permissions to allow access to the web server (755 maybe).
Placing text over an image - Android UI
If you are trying to align some text over an image and finding it difficult with RelativeLayout and any other ways, just do this. Use a RelativeLayout.
You can change the location of text over image by just changing android:gravity attribute of the TextView.
The below code which I found in stackoverflow.com places some text over center of an image.
PS: This only works inside RelativeLayout.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/relativelayout" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:id="@+id/imageView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/imageSouce" /> <TextView android:id="@+id/imageViewText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/myImageView" android:layout_alignTop="@+id/myImageView" android:layout_alignRight="@+id/myImageView" android:layout_alignBottom="@+id/myImageView" android:layout_margin="1dp" android:gravity="center" android:text="Hello" android:textColor="#000000" /> </RelativeLayout>
I wish to visit atleast 15 places mentioned here before I turn 30
Backup and restore your unrooted android device using ADB
If you want to backup your android device to a PC, but do not want to root it, here is a simple solution for that.
"No need to have super user privilege to carry out backup and restore operation "
First attach your device to computer. Select MTP as transfer protocol.
Enable USB debugging on your device by going to Settings -> Developer options.
You need to have Android SDK installed in your director, so that you can use adb to backup all your data to your computer had disk.
Open Terminal in your computer and run $ adb backup -all -apk -shared <backup-file-name>.ab
Your device will ask you to enter a password, please do it.
This will backup all your phone data, including app data and data stored in SD card into a file called <backup-file-name>.ab
You can run adb from anywhere if directory where it is located is added to path variables. Otherwise you have to navigate into that directory and run adb from there.
Similarly, to restore the backup data to your device, follow the following steps.
Attach your device to computer and run $ adb devices from computer terminal to check whether device is online or not.
If all goes well, move to directory where <backup-file-name>.ab is located and run $ adb restore <backup-file-name>.ab
Note: If you want to backup your device to cloud, you can use an app called Helium which is developed by ClockworkMod developers.
Watch this TV ad. One of the coolest ever !
Using 'git remote' to add a remote origin manually
Before reading this post please understand what 'local' and 'remote' repositories in git means. This is very important to understand difference between local and remote git repositories.
In simple words,
local git repository is a directory which exists in your computer.
remote git repository is the directory which exists in your github account ( or say bitbucket ).
Suppose say you have some day-to-day-use shell scripts in your computer ( say in $HOME/.scripts/ directory ) and you want to store them into a new repository ( this remote repository doesn't exist yet ) in your Github account.
Note: You are not cloning a remote git repository into your machine here at all. You are just pushing your already existing local scripts into a newly created remote git repository using 'git remote'.
Do the following things
Go to your github page and create a new repository called 'scripts'
Now go to your local directory which contains the scripts ( which is in your machine ) and initiate a new empty local git repository using this command git init
Now add the file contents to index using git add *
Commit the changes git commit -m "adding scripts"
Since this local_repository/scripts_directory is not a clone of any remote git repository yet, no remote origin exists for this local directory. You have to add the manually created 'scripts' directory as remote origin ( See first bullet ) git remote add origin https://github.com/<github-username>/scripts.git
Last step is to push the local scripts to remote repository git push -u origin master
Now go to https://github.com/<github-username>/scripts
Voila !!!
pacman error: failed to commit transactions (conflicting files)
You may get the above error when you are upgrading a package or installing a new package.
Suppose you get an output like this:
error: could not prepare transaction error: failed to commit transaction (conflicting files) package: /path/to/file exists in filesystem Errors occurred, no packages were upgraded.
There is a simple trick to overcome this.
run pacman -Qo /path/to/file
If this file is owned by any package, then file a bug report. Otherwise, rename the file 'which exists in your file system' and re-issue the update or install command. Everything will be fine.
A few words on Arch Linux
I use KDE .
I always wondered that, whenever I visit IRC, why most of the hackers out there criticize about using Kubuntu (A debian based KDE distro). Most of them use Arch Linux and of-course some use Gentoo also. I had used ArchLinux + KDE earlier, properly configured for my need and taste. But I had to say good bye too soon as I screwed my laptop. So never had a chance to properly enjoy Arch Linux.
And I don't know, I became too obsessed with Kubuntu than any other KDE flavors. And never used other distros since then. Trust me, I hear good things about Linux Mint. But never even tried it.
Over the time, I started getting irritated with Kubuntu. There are several problems occur while using it. First of all while installing lot of garbage also get installed. You never use those apps in your lifetime. Then why install it ? Also removing applications one by one sitting whole day is also not possible.
There are few annoying problems. Heating and fan speed. I installed ATI proprietary drivers. Then tried some more tweaks. They all worked for few days. But again started giving trouble. I could hear my laptop fan sound over my ceiling fan :D.
Next comes LCD brightness - battery monitor. I must say battery monitor sucks in Kubuntu. If you use battery monitor ( which resides in system try ) to control display brightness. It doesn't hold still. It was irritating while I watch videos. Of course there is some trick to hold display brightness at constant desired level. ;) But it also started not working after a while.
And there are much more.
I finally switched to Arch Linux a few days ago.
Now my laptop doesn't heat much. I can not hear my laptop fan's sound while ceiling fan is running. It do not consume too much of RAM, there is no inconsistency in display brightness. Boots up and shuts down too quickly. Everything is suddenly fine and my system is stable. It works the way I want.
Now I am going to tell a few words about Arch Linux
Arch Linux is cool. It just works the way I want. Everything runs fine in Arch Linux. There are lots of tricks and tweaks to make your Desktop works like the way you want. No unnecessary cluttering, heating, display brightness and many more.
Arch Linux follows a Rolling Release model of software upgrades. So you always be the first person to enjoy new stable version of a software when it is released, by using a single command.
You can install official packages and user builds using Pacman. You can use yaourt to install packages from AUR.
I would like to give a few tips for getting started with Arch Linux
Follow Arch Linux beginner's guide for installation. It's great for beginners.
Before installing Arch Linux please make sure that you have a good internet connection, in case if you want to install a full KDE package or any other.
Make a note of this. If you have tried to install ArchLinux an year ago on your laptop, believe me, you will love the wifi-menu thing while installing now :)
Arch Linux is always best for usage with a lightweight desktop environments. If you are such a person, please do not install a Desktop Environment at all. Just use ArchLinux + a Window Manager like Awesome WM or Openbox. Both are awesome. But in my case, I like to use KDE plasma workspace. So I use ArchLinux + a base, minimal installation of KDE desktop.
The best thing is, while installing Arch Linux, you are free to choose whatever you want to install ( of-course dependencies are necessary and must). No need to install all the garbage you don't want and don't need.
I suggest to use wicd for network managemment
Always look for solution in the Arch Wiki to get rid of your problems. Its the best guide I have ever seen. Its neat, handy and almost complete. You will get solution to most of your troubles in Arch Wiki itself.
Just try it for a few days. All you need is ArchLilux .iso file, a USB stick, A day to spare and the Desktop Environment of your choice.
So in my opinion, your system should be in The Arch Way.
PS: Even Gentoo is great. My friend uses it. I think, it is much more cooler than Arch Linux if you are lucky and you know how to make use of forums and IRC when you are a beginner and become an expert in Gentoo. But all you need is PATIENCE and a good CPU. Because Gentoo installs a software by downloading necessary source code of the software you want to install and dependencies and compiling them locally on your machine. So better CPU, better installation speed.
Believe me. You will learn a lot about Unix systems using Arch Linux or Gentoo
Mount ntfs partitions in rw mode in arch linux
Trouble mounting your ntfs patitions in arch linux ?? Use ntfs-3g . Its an open source implemetation of Microsoft's NTFS which includes read-write support. Its super cool. Find your ntfs partitions UUID by running lsblk -f Remember, you have to create a mount point in /run/media/user1 before editing /etc/fstab
for e.x. # mkdir /run/media/user1/Windows
Then edit your /etc/fstab. Add a line.
# Mount internal windows partition with linux compatible permissions, i.e. 755 for directories (dmask=022) and 644 for files (fmask=133) UUID=<uuid-of-ur-ntfs-partition> /run/media/user1/Windows ntfs-3g uid=1000,gid=1000,dmask=022,fmask=133 0 0
By this you can mount ntfs partitions with Linux compatible permissions i.e. 755 for directories and 644 for files using dmask=022 and fmask=133
If you want to parse Ruby, I wish you luck—there isn’t any documentation or a formal grammar that fully describes the language. Instead, you have to look at the source code to truly understand Ruby’s syntax. This is where the nightmare starts.
Take a look a Ruby’s parser, defined in parse.y....
grub rescue> in Ubuntu - Windows dual boot system
Note: This method works for grub rescue with error saying "File not found".
Prerequisite: You should know the partition in which you have installed Ubuntu (or any other Linux distro)
-------------------------------------------------------------------------------
Sometimes you may fail to boot into grub menu, but you get a black screen with something like this.
File not found
grub rescue>
How will you boot back into the grub menu? Here are few tips:
-------------------------------------------------------------------------------
Type ls .This will list your hard disk and its partitions. (Its is 'el' 'es' NOT 'ai' 'es')
grub rescue> ls
(hd0),(hd0,msdos1),(hd0,msdos2),(hd0,msdos3),(hd0,msdos4),(hd0,msdos5)
Sometimes you may get the list like this: (hd0),(hd0,0),(hd0,1),(hd0,3),(hd0,3). That's also fine!!!! Instead of (hd0,msdos1) you got (hd0,0) and so on. Thats all.
You should to know in which partition you have installed your Ubuntu ( or any other linux distros)well before running all these commands. In my case it is (hd0,msdos3). Replace (hd0,msdos3) with the partition in which you have installed Linux distro.
Type the following commands one by one.
grub rescue> set prefix=(hd0,msdos3)/boot/grub NOTE: There is no whitespace
grub rescue>insmod normal
grub rescue>normal
Alas!! your grub menu is back :)
Use Evernote in Ubuntu/Kubuntu to take your notes
Here are some tips on how to install Evernote in your Ubuntu machine.
You all know that Wine is a famous open source software available to run windows programs in other Operating Systems. But merely intalling Everernote using wine is not enough. Doing so you may get an error saying "Evernote could not able to connect to server". Here is a solution for that.
First download new version of Evernote .exe file for windows from here.
Instead of Wine you could use PlayOnLinux (GUI frontend for wine) software.
Note: For Arch Linus users, its available here. Now follow the steps.
Open PlayOnLinux. Goto Tools -> Manage Wine versions. A new dialogue box appears. Select 1.4-rc6 from available versions and move it to installed versions.
Click Configure option in main window Menu bar. New dialogue box appears.
Click New botton available in bottom left corner and give a name for that (Say Evernote). New virtual drive is going to be created.
Click Install in the main window. New installation dialogue box appears.
Click Install a non-listed program option available in the bottom-left-corner. Click Next.
Select Edit or update an existing application. Click Next.
Check Show virtual drives available in bottom-left-corner. Now select the newly created virtual drive. Click Next.
Uncheck all the 3 optins. Click Next.
Now wait while your virtual drive is being updated. Click on Browse button. Select a the Evernote .exe file you have just downloaded. Click Next.
Now Evernote installation Wizard appears. Follow the steps to install Evernote.
Click Finish after installation. Close the PlayOnLinux installtion dialogue box.
Now again go to PlayOnLinux main window. Click Configure.
Choose the virtual drive you have created for Evernote. Click on Make a new shortcut for this virtual drive.
Now go to Desktop folder and click on Evernote.desktop shortcut icon to launch Evernote !
Characters
Ram - Calm, composed guy. Teetotaler(Except when he tasted Vodka once out of peer pressure). One woman man.
Laxman - Hyper enthu guy. Too much respect for his brother. Wannabe hip-hop guy. His Facebook account reads his first name as “Laky” and last name as “Back with a bang”....