Pages

Tuesday, 26 December 2017

Top 5 Reasons Why you should be using Seedr.cc

Most of us now know what torrent is. Torrent helps us in downloading different contents in a stable mode without a premium torrent client, we doesn’t get full speed of downloading.

But in this world, there is always a solution for a problem and I am going to tell you the way to download torrent files with-

Maximum speed (not affected by no. of seeders and leechers), and


Maximum no. of simultaneous parallel connections.


Surfing through the net, you may find plenty of torrent leeching sites which will offer you the same space as mentioned, but they aren’t so convincing.

Seedr.cc is one of the place where you can download stuffs from torrent without having to go through actual complicated torrent settings.

Few are the few benefits of this site which will drive you crazy for this-

All of you who hasn’t been here, I would recommend you to check out this amazing torrent leeching platform

Thursday, 28 September 2017

SoundPool, SoundPool.Builder(), Supporting All API in Android


protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

        soundPool = new SoundPool.Builder()
                .setMaxStreams(10)
                .build();

        soundId = soundPool.load(this, R.raw.gun_shot, 1);

    } else {
        soundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 1);
        soundId = soundPool.load(this, R.raw.gun_shot, 1);
    }

}

public void gunShot(View view) {
    soundPool.play(soundId, 1, 1, 1, 0, 1);
}

Tuesday, 25 April 2017

Trick, Mnemonic to remember OSI model layers

Here is the mnemonic or trick that i used to remember OSI model layers.

All people seem to need data processing.



  • All = Application Layer
  • People = Presentation Layer
  • Seem = Session Layer
  • To = Transport Layer
  • Need = Network Layer
  • Data = Data link Layer
  • Processing = Physical Layer

Sunday, 26 March 2017

PHP Pandas 🐼🐼🐼

                                              I wanted to revise PHP ... It's been a long time. This book https://daylerees.com/php-pandas/ looks awesome. Also it's author has provided free version to read this book online.

Monday, 20 March 2017

Installing redis in macOS sierra

             Installing redis in macOS Sierra is easy if you've HomeBrew installed. Just watch this video to install redis in your macOS Sierra.

Wednesday, 15 March 2017

Multer, Nodejs, File uploading without extension. Solved.

                So i faced this problem that files that i was uploading were uploading without extensions in nodejs express server to which i was uploading files using multer. πŸ˜•

Quick workaround i found was on this Github Multer Issue Page πŸ˜„

First of all run this command to install this package mime

npm install --save mime


And this is how i was able to make it work.😎

Monday, 13 March 2017

Image uploading in Nodejs Express app using Multer

                             Follow the instructions shown in the video below to upload image in nodejs express server using multer.


Thursday, 2 February 2017

remote sdk in rubymine vagrant

                                       Just open your terminal and ssh into your vagrant and run this command


This path can be copied and pasted to the remote sdk ruby path and that's it.

Saturday, 28 January 2017

[Fixed] Angular 2, ng serve Error: no errors

                                    So guys i created an app using angular-cli and it was giving error like shown in the pic below.


This problem is due to the latest version extract-text-webpack-plugin and to solve this problem just run the command shown in the picture below.

npm install extract-text-webpack-plugin@2.0.0-rc.0 --save-dev

And this will surely solve your problem.

Monday, 23 January 2017

Node version manager in macOS Sierra

                                  It's pretty simple to install node version manager(NVM) in macOS Sierra just run these commands one by one in your iTerm2


curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash


1
2
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

After this type nvm into your iTerm2 as shown in the picture below.

and voila thats how you can install nvm in macOS Sierra :D 

Friday, 23 December 2016

webpack: difference between style-loader and css-loader

                                              i was doing webpack and wanted to add a css file to a page and so i went through the webpack way and wanted to implement this feature via webpack loader. There are basically two webpack loader both are used to together to accomplish this task
  1.  First is style-loader 
  2. Second is css-loader
This is my webpack.config.js file contents
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module.exports = {
    entry:  './src/main.js',
    output: {
        path: 'build',
        filename:   'bundle.js'
    },
    module: {
        loaders:    [
            {
                test:   /\.js$/,
                exclude:    /(node_modules)/,
                loader: 'babel',
                query:  {
                    presets: ['es2015', 'react']
                }
            },
            {
                test:   /\.css$/,
                loader: 'style-loader!css-loader'
            }
        ]
    }
}; 

Here i used the 'style-loader!css-loader' (! represents pipe here) on line 19. The css-loader takes a css file and returns the css with imports and url(...) resolved & style-loader takes that css from css-loader ( reason they are linked via a pipe which is represented via ! on line number 19 ) and inserts it into the page so that styles are active on the page.

Monday, 19 December 2016

Installing CouchDB in Ubuntu 16.04

                                                      CouchDB is one of the main NoSQL databases out there. Installing couchdb in ubuntu is fairly easy. Just run these following commands or follow the video inside this post.


sudo add-apt-repository ppa:couchdb/stable
sudo apt-get update
sudo apt-get install couchdb


Sunday, 18 December 2016

Installing brightness indicator in status bar of ubuntu 16.04

                                                   Hey guys just follow this youtube video you just have to run these three commands explained in the video to install a brightness indicator in you operating system.

sudo add-apt-repository ppa:indicator-brightness/ppa
sudo apt-get update
sudo apt-get install indicator-brightness



Friday, 16 December 2016

Ubuntu, Update, Upgrade, Dist-Upgrade

                                                                     Hey guys i just made a video on updating, upgrading and dist-upgrading ubuntu operating system in the following video.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade


                                                

Tuesday, 13 December 2016

Generating SSH keys and adding it to github.

                                                            So guys if you're on windows just like me and you are using git and want to push changes to remote repository on github without typing email and password everytime then first y'all have to generate SSH keys same as we generated in linux and then add the generated public key on the GITHUB account so we don't have to provide email password everytime we want to push something on github.

Just run this command to generate the SSH keys locally first.

ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"

This command basically creates a directory named .ssh to go to this directory use this command.

cd ~/.ssh

NOTE Those two commands must be ran using git-bash.

After navigating into the directory you will find that it has three files.

1
2
3
id_rsa  
id_rsa.pub  
known_hosts

Only id_rsa.pub is of our use it is actually the public key and we have to upload the content of the id_rsa.pub file to this github link.

That's it. :D 

Friday, 2 December 2016

component relative paths instead of absolute path in angular 2

                                                                         So guys if you're using quickstart repo of angular 2 instead of ng-cli then many things you have to do yourself one of them is relative path of component html and stylesheets and you can do this simply by using moduleId in component like in the example shown below

1
2
3
4
5
@Component({
  moduleId: module.id,
  selector: 'user-app',
  templateUrl: 'user.component.html'
})

This will make the relative path work. I also added this solution as a stackoverflow answer. feel free to upvote.

Tuesday, 29 November 2016

Installing node npm using nvm (node version manager) in ubuntu 16.04

                                                                                Following the path of ruby, developers of node also created node version manager (nvm) just like ruby version manager (rvm) to manage multiple node versions in the same operating system. So guys in this post i am gonna show you all how to install node version manager in ubuntu 16.04 operating system.

so basically open the terminal and run this command


wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash


after running this command run these two command in the terminal

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm


and after that load the shell i.e if you're using bash then run this command in terminal

source ~/.bashrc

and if you're using zsh instead of bash then run this command in terminal

source ~/.zshrc

and thats it now you have access to the nvm command line utility.


to install latest version of node and npm into the system just run this command


Thats it. if you wanna learn more than use this command

nvm --help

There are various command available in nvm to manager and pull new node and npm versions. 

Installing angular-cli in ubuntu 16.04

                                                           Angular-cli is very useful command line utility to develop angular 2 based applications. In this tutorial i am gonna show you guys how you can install angular cli in ubuntu 16.04. So first of all let me check the version of nodejs installed into my system.

so here is my node version at the time of writing this blog post.


I installed node using node version manager. Follow this tutorial link to install and learn more about node and npm. So now lets get angular-cli installed in our ubuntu operating system.


Running this command with -g flag will install angular-cli globally on your operating system. After running this command you will get access to a command line utility named ng.

So now lets run ng help in the command line & it will give the following output.


lets check the version of angular-cli i installed at the time of writing this post.


Now lets create a test application using angular-cli for that run the following command shown in the picture below.



ng new test_app command will go and create a folder named test app in which it creates some file and installs dependencies via npm. now lets run this project by going into the project and running the command shown in the picture below.



after running command ng serve in the root of the project visit the link http://localhost:4200/ in the browser and voila!


Sunday, 16 October 2016

Friday, 14 October 2016

Installing utorrent in ubuntu 16.04

                                           Before viewing the video first of all run these four commands

sudo apt-get update
sudo apt-get  upgrade
sudo apt-get dist-upgrade
sudo apt-get install libssl1.0.0 libssl-dev

Now view the following video and follow the instructions to install utorrent in ubuntu.